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