openrat-cms

OpenRat Content Management System
git clone http://git.code.weiherhei.de/openrat-cms.git
Log | Files | Refs | README

TemplateListingAction.class.php (691B)


      1 <?php
      2 namespace cms\action\template;
      3 use cms\action\Method;
      4 use cms\action\TemplateAction;
      5 use cms\model\Project;
      6 use util\Html;
      7 
      8 
      9 class TemplateListingAction extends TemplateAction implements Method {
     10 
     11     public function view() {
     12 		$list = array();
     13 
     14         $project = new Project( $this->template->projectid );
     15 
     16 		foreach( $project->getTemplates() as $id=>$name )
     17 		{
     18 			$list[$id] = array();
     19 			$list[$id]['name'] = $name;
     20 			$list[$id]['url' ] = Html::url('template','el',$id,array());
     21 		}
     22 		
     23 //		$var['templatemodelid'] = htmlentities( $id   );
     24 //		$var['text']            = htmlentities( $text );
     25 		$this->setTemplateVar('templates',$list);
     26     }
     27     public function post() {
     28     }
     29 }