openrat-cms

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

TemplateInfoAction.class.php (627B)


      1 <?php
      2 namespace cms\action\template;
      3 use cms\action\Method;
      4 use cms\action\TemplateAction;
      5 use cms\model\Page;
      6 
      7 
      8 class TemplateInfoAction extends TemplateAction implements Method {
      9     public function view() {
     10 		$pages = array();
     11 		$pageids = $this->template->getDependentObjectIds();
     12 		
     13 		foreach( $pageids as $pageid )
     14 		{
     15 			$page = new Page($pageid);
     16 			$page->load();
     17 
     18 			$pages[$pageid] = $page->filename;
     19 		}
     20 		
     21 		$this->setTemplateVar('pages',$pages);
     22 		$this->setTemplateVar('id'   ,$this->template->getId()   );
     23 		$this->setTemplateVar('name' ,$this->template->getName() );
     24     }
     25     public function post() {
     26     }
     27 }