how to use implement a function from another controller in symfony code example
Example: symfony call another controller
// OtherController::fancy($name, $color) will be executed
public function myAction($name)
{
$response = $this->forward(
'App\Controller\OtherController::fancy',
array(
'name' => $name,
'color' => 'green',
)
);
// ... further modify the response or return it directly
return $response;
}