File modules/cms/generator/PageContext.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 use cms\generator\link\PreviewLink; 9 use cms\generator\link\PublicLink; 10 11 /** 12 * The page context, necessary for generating and publishing a page. 13 */ 14 class PageContext extends BaseContext 15 { 16 17 /** 18 * The source page, links are generated from the view of this page. 19 * @var int 20 */ 21 public $sourceObjectId; 22 23 /** 24 * The page which should be generated. 25 * @var int 26 */ 27 public $objectId; 28 29 /** 30 * Language. 31 * @var int 32 */ 33 public $languageId; 34 35 /** 36 * Model. 37 * @var int 38 */ 39 public $modelId; 40 41 public function __construct($objectId, $scheme ) 42 { 43 $this->objectId = $objectId; 44 $this->sourceObjectId = $objectId; 45 $this->scheme = $scheme; 46 } 47 48 public function getCacheKey() 49 { 50 return [ 51 $this->objectId, 52 $this->languageId, 53 $this->modelId, 54 $this->scheme 55 ]; 56 } 57 58 59 public function getObjectId() 60 { 61 return $this->sourceObjectId; 62 } 63 }
Download modules/cms/generator/PageContext.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, ... Tue, 14 Jun 2022 01:11:09 +0200 Jan Dankert New: Support for ESI templates; some bugfixes while generating the 'insert' element type. Sat, 13 Mar 2021 22:38:30 +0100 Jan Dankert New filter for using links in text nodes (useful in CSS or script files) Sat, 27 Feb 2021 02:10:16 +0100 Jan Dankert Fix: Using the correct object-id for generating the page. 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. Fri, 18 Sep 2020 23:04:13 +0200 Jan Dankert Refactoring: Renaming module "cms/publish" to "cms/generator"