Пример #1
0
 /**
  * Check and add session id to URL
  *
  * @param string $url
  *
  * @return \Magento\Framework\UrlInterface
  */
 protected function _prepareSessionUrl($url)
 {
     if (!$this->getUseSession()) {
         return $this;
     }
     $sessionId = $this->_session->getSessionIdForHost($url);
     if ($this->_sidResolver->getUseSessionVar() && !$sessionId) {
         $this->setQueryParam('___SID', $this->_isSecure() ? 'S' : 'U');
     } elseif ($sessionId) {
         $this->setQueryParam($this->_sidResolver->getSessionIdQueryParam($this->_session), $sessionId);
     }
     return $this;
 }