示例#1
0
 /**
  * Set redirect into response
  *
  * @param \Magento\Framework\App\ResponseInterface $response
  * @param string $path
  * @param array $arguments
  * @return void
  */
 public function redirect(\Magento\Framework\App\ResponseInterface $response, $path, $arguments = array())
 {
     if ($this->_session->getCookieShouldBeReceived() && $this->_urlBuilder->getUseSession() && $this->_canUseSessionIdInParam) {
         $arguments += array('_query' => array($this->_sidResolver->getSessionIdQueryParam($this->_session) => $this->_session->getSessionId()));
     }
     $response->setRedirect($this->_urlBuilder->getUrl($path, $arguments));
 }
示例#2
0
 /**
  * Check whether redirect url should be used for secure routes
  *
  * @return bool
  */
 protected function _shouldRedirectToSecure()
 {
     return $this->_url->getUseSession();
 }
示例#3
0
 public function testSetGetUseSession()
 {
     $this->assertTrue((bool) $this->_model->getUseSession());
     $this->_model->setUseSession(false);
     $this->assertFalse($this->_model->getUseSession());
 }