/** * 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)); }
/** * Check whether redirect url should be used for secure routes * * @return bool */ protected function _shouldRedirectToSecure() { return $this->_url->getUseSession(); }
public function testSetGetUseSession() { $this->assertTrue((bool) $this->_model->getUseSession()); $this->_model->setUseSession(false); $this->assertFalse($this->_model->getUseSession()); }