Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
SaveMethod.php
Go to the documentation of this file.
1 <?php
7 
10 
11 class SaveMethod extends Index
12 {
18  public function execute()
19  {
20  if ($this->sessionHelper->isPersistent()) {
21  $this->sessionHelper->getSession()->removePersistentCookie();
22  if (!$this->customerSession->isLoggedIn()) {
23  $this->customerSession->setCustomerId(null)->setCustomerGroupId(null);
24  }
25  $this->quoteManager->setGuest();
26  }
27  $checkoutUrl = $this->_redirect->getRefererUrl();
29  $resultRedirect = $this->resultFactory->create(ResultFactory::TYPE_REDIRECT);
30  $resultRedirect->setUrl($checkoutUrl . (strpos($checkoutUrl, '?') ? '&' : '?') . 'register');
31  return $resultRedirect;
32  }
33 }
_redirect($path, $arguments=[])
Definition: Action.php:167