/** * @desc Constructs a {@link FileTemplateLoader} from the file's identifier. * @param string $identifier The file's identifier * @param TemplateData $data The data which is associated to the loader. It is used to assign * the PICTURES_DATA_PATH variable that corresponds the the module's pictures data path (it depends on * whether the theme redefines them or not). */ public function __construct($identifier, TemplateData $data) { $this->filepath = $identifier; $this->compute_real_file_path(); $this->compute_cache_file_path(); $data->put('PICTURES_DATA_PATH', $this->pictures_data_path); }
/** * {@inheritdoc} */ public function add_subtemplate($identifier, Template $template) { $this->data->put($identifier, $template); return $this; }