File modules/cms/action/script/ScriptHistoryAction.class.php

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