public function init()
{
parent::init();
$this->cache = $this->enabled ? Instance::ensure($this->cache, Cache::className()) : null;
if ($this->cache instanceof Cache && $this->getCachedContent() === false) {
$this->getView()->cacheStack[] = $this;
ob_start();
ob_implicit_flush(false);
}
}
public function init() { parent::init(); if ($this->viewElementsGathener === null) { throw new InvalidConfigException('ViewElementsGathener should be set'); } if (is_string($this->viewElementsGathener)) { $this->viewElementsGathener = Yii::$app->get($this->viewElementsGathener); } }