Beispiel #1
0
 /**
  * @return string
  */
 protected function _toHtml()
 {
     if ($this->_wishlistHelper->isAllow()) {
         return parent::_toHtml();
     }
     return '';
 }
Beispiel #2
0
 /**
  * Render block HTML
  *
  * @return string
  */
 protected function _toHtml()
 {
     if ($this->_moduleManager->isOutputEnabled('Magento_Checkout')) {
         return '';
     }
     return parent::_toHtml();
 }
 /**
  * {@inheritdoc}
  */
 protected function _toHtml()
 {
     if (!$this->_registration->isAllowed() || $this->httpContext->getValue(Context::CONTEXT_AUTH)) {
         return '';
     }
     return parent::_toHtml();
 }
Beispiel #4
0
 /**
  * @param \Magento\Framework\View\Element\Template\Context $context
  * @param \Magento\Framework\App\Http\Context $httpContext
  * @param \Magento\Customer\Helper\Data $customerHelper
  * @param \Magento\Core\Helper\PostData $postDataHelper
  * @param array $data
  */
 public function __construct(\Magento\Framework\View\Element\Template\Context $context, \Magento\Framework\App\Http\Context $httpContext, \Magento\Customer\Helper\Data $customerHelper, \Magento\Core\Helper\PostData $postDataHelper, array $data = array())
 {
     parent::__construct($context, $data);
     $this->httpContext = $httpContext;
     $this->_customerHelper = $customerHelper;
     $this->_postDataHelper = $postDataHelper;
 }
Beispiel #5
0
 /**
  * @return string
  */
 protected function _toHtml()
 {
     if ($this->dataHelper->isActive()) {
         return parent::_toHtml();
     }
     return '';
 }
 /**
  * @param \Magento\Framework\View\Element\Template\Context $context
  * @param \Magento\Framework\App\Http\Context $httpContext
  * @param \Magento\Customer\Model\Url $customerUrl
  * @param \Magento\Framework\Data\Helper\PostHelper $postDataHelper
  * @param array $data
  */
 public function __construct(\Magento\Framework\View\Element\Template\Context $context, \Magento\Framework\App\Http\Context $httpContext, \Magento\Customer\Model\Url $customerUrl, \Magento\Framework\Data\Helper\PostHelper $postDataHelper, array $data = [])
 {
     parent::__construct($context, $data);
     $this->httpContext = $httpContext;
     $this->_customerUrl = $customerUrl;
     $this->_postDataHelper = $postDataHelper;
 }
Beispiel #7
0
 /**
  * Render block HTML
  *
  * @return string
  */
 protected function _toHtml()
 {
     if (!$this->_checkoutHelper->canOnepageCheckout() || !$this->_moduleManager->isOutputEnabled('Magento_Checkout')) {
         return '';
     }
     return parent::_toHtml();
 }
Beispiel #8
0
 /**
  * {@inheritdoc}
  */
 protected function _toHtml()
 {
     if (!$this->_customerHelper->isRegistrationAllowed() || $this->httpContext->getValue(\Magento\Customer\Helper\Data::CONTEXT_AUTH)) {
         return '';
     }
     return parent::_toHtml();
 }
Beispiel #9
0
 /**
  * @param \Magento\Framework\View\Element\Template\Context $context
  * @param \Magento\Customer\Helper\View $customerViewHelper
  * @param \Magento\Persistent\Helper\Session $persistentSessionHelper
  * @param CustomerAccountServiceInterface $customerAccountService
  * @param array $data
  */
 public function __construct(\Magento\Framework\View\Element\Template\Context $context, \Magento\Customer\Helper\View $customerViewHelper, \Magento\Persistent\Helper\Session $persistentSessionHelper, CustomerAccountServiceInterface $customerAccountService, array $data = array())
 {
     $this->_customerViewHelper = $customerViewHelper;
     $this->_persistentSessionHelper = $persistentSessionHelper;
     $this->_customerAccountService = $customerAccountService;
     parent::__construct($context, $data);
     $this->_isScopePrivate = true;
 }
Beispiel #10
0
 /**
  * Constructor
  *
  * @param \Magento\Framework\View\Element\Template\Context $context
  * @param \Magento\Customer\Helper\View $customerViewHelper
  * @param \Magento\Persistent\Helper\Session $persistentSessionHelper
  * @param \Magento\Customer\Api\CustomerRepositoryInterface $customerRepository
  * @param array $data
  */
 public function __construct(\Magento\Framework\View\Element\Template\Context $context, \Magento\Customer\Helper\View $customerViewHelper, \Magento\Persistent\Helper\Session $persistentSessionHelper, \Magento\Customer\Api\CustomerRepositoryInterface $customerRepository, array $data = [])
 {
     $this->isScopePrivate = true;
     $this->_customerViewHelper = $customerViewHelper;
     $this->_persistentSessionHelper = $persistentSessionHelper;
     $this->customerRepository = $customerRepository;
     parent::__construct($context, $data);
     $this->_isScopePrivate = true;
 }
Beispiel #11
0
 /**
  * @param \Magento\Framework\View\Element\Html\Link $link
  * @param string $expected
  *
  * @dataProvider getLinkAttributesDataProvider
  */
 public function testGetLinkAttributes($link, $expected)
 {
     $this->assertEquals($expected, $link->getLinkAttributes());
 }
Beispiel #12
0
 /**
  * @param \Magento\Framework\View\Element\Template\Context $context
  * @param \Magento\Customer\Model\Url $customerUrl
  * @param array $data
  */
 public function __construct(\Magento\Framework\View\Element\Template\Context $context, \Magento\Customer\Model\Url $customerUrl, array $data = [])
 {
     $this->_customerUrl = $customerUrl;
     parent::__construct($context, $data);
 }
Beispiel #13
0
 /**
  * @param \Magento\Framework\View\Element\Template\Context $context
  * @param \Magento\Framework\Registry $registry
  * @param \Magento\Shipping\Helper\Data $shippingData
  * @param array $data
  */
 public function __construct(\Magento\Framework\View\Element\Template\Context $context, \Magento\Framework\Registry $registry, \Magento\Shipping\Helper\Data $shippingData, array $data = [])
 {
     $this->_shippingData = $shippingData;
     $this->_coreRegistry = $registry;
     parent::__construct($context, $data);
 }
Beispiel #14
0
 /**
  * Render block HTML
  * or return empty string if url can't be prepared
  *
  * @return string
  */
 protected function _toHtml()
 {
     if ($this->getHref()) {
         return parent::_toHtml();
     }
     return '';
 }
 /**
  * @param \Magento\Framework\View\Element\Template\Context $context
  * @param \Magefan\Blog\Model\Url $url
  * @param array $data
  */
 public function __construct(\Magento\Framework\View\Element\Template\Context $context, \Magefan\Blog\Model\Url $url, array $data = [])
 {
     $this->_url = $url;
     parent::__construct($context, $data);
 }
 public function __construct(Context $context, Data $helper, array $data = [])
 {
     $this->helper = $helper;
     parent::__construct($context, $data);
 }
Beispiel #17
0
 /**
  * @param \Magento\Framework\View\Element\Template\Context $context
  * @param \Magento\Cms\Model\ResourceModel\Page $resourcePage
  * @param \Magento\Cms\Helper\Page $cmsPage
  * @param array $data
  */
 public function __construct(\Magento\Framework\View\Element\Template\Context $context, \Magento\Cms\Model\ResourceModel\Page $resourcePage, \Magento\Cms\Helper\Page $cmsPage, array $data = [])
 {
     parent::__construct($context, $data);
     $this->_resourcePage = $resourcePage;
     $this->_cmsPage = $cmsPage;
 }
Beispiel #18
0
 /**
  * @param \Magento\Framework\View\Element\Template\Context $context
  * @param \Magento\Customer\Helper\Data $customerHelper
  * @param array $data
  */
 public function __construct(\Magento\Framework\View\Element\Template\Context $context, \Magento\Customer\Helper\Data $customerHelper, array $data = array())
 {
     $this->_customerHelper = $customerHelper;
     parent::__construct($context, $data);
     $this->_isScopePrivate = true;
 }