Example #1
0
 /**
  * Retrive remembered Return URL from key.
  * 
  * Default key: 'return' GET param.
  * 
  * @param string|null
  * @return self
  */
 public function returnUrl($default = null, $key = null)
 {
     if (!$key) {
         $key = $this->get('request')->get('return');
     }
     if ($this->session->hasBag('returnUrls') && ($return = $this->session->getBag('returnUrls')->get($key))) {
         return $return;
     }
     return $default;
 }