コード例 #1
0
ファイル: RegisterLink.php プロジェクト: aiesh/magento2
 /**
  * {@inheritdoc}
  */
 protected function _toHtml()
 {
     if (!$this->_customerHelper->isRegistrationAllowed() || $this->httpContext->getValue(\Magento\Customer\Helper\Data::CONTEXT_AUTH)) {
         return '';
     }
     return parent::_toHtml();
 }
コード例 #2
0
ファイル: Create.php プロジェクト: pavelnovitsky/magento2
 /**
  * Customer register form page
  *
  * @return void
  */
 public function execute()
 {
     if ($this->_getSession()->isLoggedIn() || !$this->customerHelper->isRegistrationAllowed()) {
         $this->_redirect('*/*');
         return;
     }
     $this->_view->loadLayout();
     $this->_view->getLayout()->initMessages();
     $this->_view->renderLayout();
 }
コード例 #3
0
ファイル: CreatePost.php プロジェクト: pavelnovitsky/magento2
 /**
  * Is registration allowed
  *
  * @return bool
  */
 protected function isRegistrationAllowed()
 {
     return $this->_customerHelperData->isRegistrationAllowed();
 }