File modules/cms/action/pageelement/PageelementInfoAction.class.php
Last commit: Sat Dec 4 01:27:06 2021 +0100 dankert Fix: Pageelement has no language
1 <?php 2 namespace cms\action\pageelement; 3 use cms\action\Method; 4 use cms\action\PageelementAction; 5 use cms\model\Element; 6 use cms\model\PageContent; 7 use cms\model\Template; 8 use cms\model\User; 9 10 class PageelementInfoAction extends PageelementAction implements Method { 11 12 public function view() { 13 14 $this->element->load(); 15 16 $this->setTemplateVar('name' ,$this->element->name ); 17 $this->setTemplateVar('description' ,$this->element->desc ); 18 $this->setTemplateVar('elementid' ,$this->element->elementid); 19 $this->setTemplateVar('element_id' ,$this->element->elementid ); 20 $this->setTemplateVar('element_name' ,$this->element->name ); 21 $this->setTemplateVar('element_type' ,$this->element->getTypeName() ); 22 $this->setTemplateVar('element_format',Element::getAvailableFormats()[ $this->element->format] ); 23 24 $this->setTemplateVar('lastchange_date',0); 25 26 $t = new Template( $this->page->templateid ); 27 $t->load(); 28 $this->setTemplateVar('template_name',$t->name ); 29 $this->setTemplateVar('template_id' ,$t->templateid ); 30 } 31 32 33 public function post() { 34 } 35 }
Downloadmodules/cms/action/pageelement/PageelementInfoAction.class.php
History Sat, 4 Dec 2021 01:27:06 +0100 dankert Fix: Pageelement has no language Tue, 17 Nov 2020 23:51:00 +0100 Jan Dankert Refactoring: Every Actionmethod has now its own class.