File modules/cms/action/image/ImageHistoryAction.class.php
Last commit: Sat Nov 27 00:11:56 2021 +0100 Jan Dankert New: History for files and templates.
1 <?php 2 namespace cms\action\image; 3 use cms\action\ImageAction; 4 use cms\action\Method; 5 use cms\model\Content; 6 use cms\model\Project; 7 use cms\model\Value; 8 9 10 class ImageHistoryAction extends ImageAction implements Method { 11 12 public function view() { 13 14 $project = new Project( $this->image->projectid ); 15 $values = []; 16 17 /** @var Content */ 18 $content = new Content( $this->image->contentid ); 19 20 foreach( $content->getVersionList() as $valueId ) { 21 22 $value = new Value(); 23 $value->loadWithId( $valueId ); 24 25 $values[] = [ 26 'text' => '', 27 'active' => $value->active, 28 'publish' => $value->publish, 29 'user' => $value->lastchangeUserName, 30 'date' => $value->lastchangeTimeStamp, 31 'id' => $value->getId(), 32 'usable' => ! $value->active, 33 'releasable' => $value->active && ! $value->publish, 34 'comparable' => false, 35 ]; 36 } 37 38 $this->setTemplateVar('values',$values ); 39 } 40 41 public function post() 42 { 43 } 44 }
Downloadmodules/cms/action/image/ImageHistoryAction.class.php
History Sat, 27 Nov 2021 00:11:56 +0100 Jan Dankert New: History for files and templates.