File modules/cms/generator/ValueContext.class.php
Last commit: Sat Jun 25 14:26:33 2022 +0200 Jan Dankert New: Many Enhancements for the internal script language: More access to the data structure of pages, folders, templates, ...
1 <?php 2 3 4 namespace cms\generator; 5 6 7 /** 8 * The page context, necessary for generating and publishing a page. 9 */ 10 class ValueContext extends BaseContext 11 { 12 public $elementid; 13 14 /** 15 * @var PageContext 16 */ 17 public $pageContext; 18 19 /** 20 * @param $pageContext PageContext 21 */ 22 public function __construct($pageContext ) 23 { 24 $this->pageContext = $pageContext; 25 $this->scheme = $pageContext->scheme; 26 } 27 28 public function getCacheKey() 29 { 30 return array_merge( ['value'], $this->pageContext->getCacheKey(), [ $this->elementid ] ); 31 } 32 33 public function isPublic() { 34 return $this->scheme == Producer::SCHEME_PUBLIC; 35 } 36 37 public function getObjectId() 38 { 39 return $this->pageContext->getObjectId(); 40 } 41 }
Downloadmodules/cms/generator/ValueContext.class.php
History Sat, 25 Jun 2022 14:26:33 +0200 Jan Dankert New: Many Enhancements for the internal script language: More access to the data structure of pages, folders, templates, ... Sat, 13 Mar 2021 22:54:42 +0100 Jan Dankert Fix: ValueContext must implement getObjectId() Wed, 23 Sep 2020 01:04:05 +0200 Jan Dankert Cleanup of deprecated methods and deprecated class attributes. Mon, 21 Sep 2020 22:48:59 +0200 Jan Dankert Complexe refactoring: Moving all generation logic from the model (Value,Page,File) to generators classes.