Beispiel #1
0
 /**
  * @param \Magento\Backend\Block\Template\Context $context
  * @param array $data
  */
 public function __construct(\Magento\Backend\Block\Template\Context $context, array $data = [])
 {
     parent::__construct($context, $data);
     if (!$this->_request->getParam('id') || !$this->_authorization->isAllowed('Magento_Review::reviews_all')) {
         $this->setCanShow(false);
     }
 }
Beispiel #2
0
 /**
  * @param \Magento\Backend\Block\Template\Context $context
  * @param array $data
  */
 public function __construct(\Magento\Backend\Block\Template\Context $context, array $data = [])
 {
     parent::__construct($context, $data);
     if (!$this->_request->getParam('id') || !$this->_authorization->isAllowed('Kuzman_ProductFaq::product_faq')) {
         $this->setCanShow(false);
     }
 }
Beispiel #3
0
 /**
  * Tab is hidden
  *
  * @return bool
  */
 public function canShowTab()
 {
     $alertPriceAllow = $this->_scopeConfig->getValue('catalog/productalert/allow_price', \Magento\Store\Model\ScopeInterface::SCOPE_STORE);
     $alertStockAllow = $this->_scopeConfig->getValue('catalog/productalert/allow_stock', \Magento\Store\Model\ScopeInterface::SCOPE_STORE);
     return ($alertPriceAllow || $alertStockAllow) && parent::canShowTab();
 }