Example #1
0
 /**
  * {@inheritdoc}
  *
  * @param array $arguments
  * @return array
  */
 public function updatePathParams(array $arguments)
 {
     if ($this->_session->getCookieShouldBeReceived() && $this->_sidResolver->getUseSessionInUrl() && $this->_canUseSessionIdInParam) {
         $arguments += ['_query' => [$this->_sidResolver->getSessionIdQueryParam($this->_session) => $this->_session->getSessionId()]];
     }
     return $arguments;
 }
Example #2
0
 /**
  * Retrieve Product URL
  *
  * @param  \Magento\Catalog\Model\Product $product
  * @param  bool $useSid forced SID mode
  * @return string
  */
 public function getProductUrl($product, $useSid = null)
 {
     if ($useSid === null) {
         $useSid = $this->_sidResolver->getUseSessionInUrl();
     }
     $params = array();
     if (!$useSid) {
         $params['_nosid'] = true;
     }
     return $this->getUrl($product, $params);
 }
Example #3
0
 /**
  * Retrieve use session rule
  *
  * @return bool
  * @SuppressWarnings(PHPMD.BooleanGetMethodName)
  */
 public function getUseSession()
 {
     if (is_null($this->_useSession)) {
         $this->_useSession = $this->_sidResolver->getUseSessionInUrl();
     }
     return $this->_useSession;
 }