Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

symfony call another controller

// OtherController::fancy($name, $color) will be executed
public function myAction($name)
{
    $response = $this->forward(
    	'AppControllerOtherController::fancy',
    	array(
      		'name'  => $name,
        	'color' => 'green',
    	)
    );
    // ... further modify the response or return it directly
    return $response;
}
Source by symfony.com #
 
PREVIOUS NEXT
Tagged: #symfony #call #controller
ADD COMMENT
Topic
Name
6+8 =