File modules/cms/generator/BaseContext.class.php
Last commit: Tue Jun 14 01:11:09 2022 +0200 Jan Dankert New: Support for ESI templates; some bugfixes while generating the 'insert' element type.
1 <?php 2 3 4 namespace cms\generator; 5 6 7 use cms\generator\link\LinkFormat; 8 use cms\generator\link\PreviewLink; 9 use cms\generator\link\PublicLink; 10 11 abstract class BaseContext 12 { 13 /** 14 * Scheme, 15 * one of PREVIEW or PUBLIC. 16 * @var int 17 */ 18 public $scheme; 19 20 public abstract function getCacheKey(); 21 22 public abstract function getObjectId(); 23 24 /** 25 * @return LinkFormat 26 */ 27 public function getLinkScheme() { 28 29 switch( $this->scheme ) { 30 case Producer::SCHEME_PREVIEW: 31 return new PreviewLink( $this ); 32 case Producer::SCHEME_PUBLIC: 33 return new PublicLink( $this ); 34 default: 35 return null; 36 } 37 } 38 39 }
Downloadmodules/cms/generator/BaseContext.class.php
History 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) 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.