File modules/cms/generator/FileContext.class.php
Last commit: Mon Dec 6 01:00:00 2021 +0100 dankert New: Show a version from file history; New: Text history.
1 <?php 2 3 4 namespace cms\generator; 5 6 7 8 /** 9 * The page context, necessary for generating and publishing a file. 10 */ 11 class FileContext extends BaseContext 12 { 13 /** 14 * File id. 15 * @var int 16 */ 17 public $sourceObjectId; 18 19 /** 20 * FileContext constructor. 21 * @param $sourceObjectId 22 */ 23 public function __construct($sourceObjectId,$scheme ) 24 { 25 $this->sourceObjectId = $sourceObjectId; 26 $this->scheme = $scheme; 27 } 28 29 public function getCacheKey() 30 { 31 return [ 32 'file', 33 $this->sourceObjectId, 34 $this->scheme 35 ]; 36 } 37 38 39 public function getObjectId() 40 { 41 return $this->sourceObjectId; 42 } 43 }
Downloadmodules/cms/generator/FileContext.class.php
History Mon, 6 Dec 2021 01:00:00 +0100 dankert New: Show a version from file history; New: Text history. 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.