File modules/cms/action/modellist/ModellistEditAction.class.php
Last commit: Thu Nov 19 12:36:44 2020 +0100 Jan Dankert Fix: nextSubAction() is depracated and should not be used.
1 <?php 2 namespace cms\action\modellist; 3 use cms\action\Method; 4 use cms\action\ModellistAction; 5 use cms\model\Model; 6 use cms\model\Project; 7 use util\Html; 8 9 class ModellistEditAction extends ModellistAction implements Method { 10 11 public function view() { 12 $project = new Project( $this->project->projectid ); 13 14 $list = array(); 15 foreach( $project->getModelIds() as $id ) 16 { 17 $m = new Model( $id ); 18 $m->load(); 19 20 $list[$id]['id' ] = $id; 21 $list[$id]['name'] = $m->name; 22 23 $list[$id]['is_default'] = $m->isDefault; 24 $list[$id]['select_url'] = Html::url('index','model',$id); 25 } 26 $this->setTemplateVar( 'el',$list ); 27 $this->setTemplateVar( 'add',$this->userIsAdmin() ); 28 } 29 30 public function post() { 31 } 32 }
Downloadmodules/cms/action/modellist/ModellistEditAction.class.php
History Thu, 19 Nov 2020 12:36:44 +0100 Jan Dankert Fix: nextSubAction() is depracated and should not be used. Tue, 17 Nov 2020 23:51:00 +0100 Jan Dankert Refactoring: Every Actionmethod has now its own class.