openrat-cms

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

FileHistoryContext.class.php (601B)


      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 }