File modules/cms/action/user/UserHistoryAction.class.php
Last commit: Tue Nov 17 23:51:00 2020 +0100 Jan Dankert Refactoring: Every Actionmethod has now its own class.
1 <?php 2 namespace cms\action\user; 3 use cms\action\Method; 4 use cms\action\UserAction; 5 use cms\model\BaseObject; 6 7 class UserHistoryAction extends UserAction implements Method { 8 public function view() { 9 $lastChanges = $this->user->getLastChanges(); 10 11 $timeline = array(); 12 13 foreach( $lastChanges as $entry ) 14 { 15 $timeline[ $entry['objectid'] ] = $entry; 16 $baseObject = new BaseObject( $entry['objectid']); 17 $baseObject->objectLoad(); 18 $timeline[ $entry['objectid'] ]['type'] = $baseObject->getType(); 19 } 20 $this->setTemplateVar('timeline', $timeline); 21 } 22 public function post() { 23 } 24 }
Downloadmodules/cms/action/user/UserHistoryAction.class.php
History Tue, 17 Nov 2020 23:51:00 +0100 Jan Dankert Refactoring: Every Actionmethod has now its own class.