/** * Check if widget is visible * * @return boolean */ protected function isVisible() { $result = static::getWidgetTarget() != \XLite\Core\Request::getInstance()->target && parent::isVisible() && 0 < $this->getItemsCount(); if ($result) { if (!\XLite\Core\CMSConnector::isCMSStarted()) { if (self::WIDGET_TYPE_SIDEBAR == $this->getParam(self::PARAM_WIDGET_TYPE)) { $result = in_array($this->viewListName, array('sidebar.second', 'sidebar.single')); } elseif (self::WIDGET_TYPE_CENTER == $this->getParam(self::PARAM_WIDGET_TYPE)) { $result = 'center.bottom' == $this->viewListName; } } } return $result; }
/** * Check if widget is visible * * @return boolean */ protected function isVisible() { return static::getWidgetTarget() == \XLite\Core\Request::getInstance()->target && parent::isVisible(); }