File modules/cms/generator/FileHistoryContext.class.php

Last commit: Sun Feb 13 20:14:39 2022 +0100	dankert	Refactoring: removed duplicate code, use inheritance ;)
1 <?php 2 3 4 namespace cms\generator; 5 6 7 8 /** 9 * The file history context, necessary for generating and publishing a file. 10 */ 11 class FileHistoryContext extends FileContext 12 { 13 /** 14 * value id. 15 * 16 * @var int 17 */ 18 public $valueId; 19 20 /** 21 * FileHistoryContext constructor. 22 * 23 * @param $sourceObjectId 24 * @param $valueId 25 */ 26 public function __construct($sourceObjectId,$valueId ) 27 { 28 parent::__construct($sourceObjectId,Producer::SCHEME_PREVIEW); 29 $this->valueId = $valueId; 30 } 31 32 public function getCacheKey() 33 { 34 return array_merge( parent::getCacheKey(),['history',$this->valueId] ); 35 } 36 }
Download modules/cms/generator/FileHistoryContext.class.php
History Sun, 13 Feb 2022 20:14:39 +0100 dankert Refactoring: removed duplicate code, use inheritance ;) Mon, 6 Dec 2021 01:00:00 +0100 dankert New: Show a version from file history; New: Text history.