Controller/Component/PermitComponent.php
public function redirect(Controller $Controller, $route) {
		if ($route['message'] != null) {
			$message = $route['message'];
			$element = $route['element'];
			$params = $route['params'];
			$this->Session->write("Message.{$route['key']}", compact('message', 'element', 'params'));
		}

		$Controller->redirect($route['redirect']);
	}
public function redirect(Controller $Controller, $route) {
		if ($route['message'] != null) {
			$message = $route['message'];
			$element = $route['element'];
			$params = $route['params'];
			$this->Session->write("Message.{$route['key']}", compact('message', 'element', 'params'));
		}

		$Controller->redirect($route['redirect']);
	}
public function redirect ( Controller $ Controller , $ route ) { if ( $ route [ 'message' ] != null ) { $ message = $ route [ 'message' ] ; $ element = $ route [ 'element' ] ; $ params = $ route [ 'params' ] ; $ this -> Session -> write ( "Message.{$route['key']}" , compact ( 'message' , 'element' , 'params' ) ) ; } $ Controller -> redirect ( $ route [ 'redirect' ] ) ; }
Performs a redirect based upon a given route

@param Controller|object $Controller A reference to the instantiating controller object
@param array $route A Permit Route
@return void
Performs a redirect based upon a given route