/** * Output content, if allowed * * @return string */ protected function _toHtml() { if (!$this->canDisplay()) { return ''; } return parent::_toHtml(); }
/** * Retrieve block cache tags based on category * * @return array */ public function getCacheTags() { return array_merge(parent::getCacheTags(), $this->getCategory()->getCacheIdTags()); }