openrat-cms

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

UserHistoryAction.class.php (680B)


      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 }