create module event and eventListener

This commit is contained in:
Manuel Raynaud
2013-10-17 18:26:23 +02:00
parent 1b0de7144a
commit d25ad53d5a
9 changed files with 256 additions and 6 deletions

View File

@@ -58,7 +58,7 @@ class BaseController extends ContainerAware
/**
* Return an empty response (after an ajax request, for example)
*/
protected function nullResponse($status = 200)
protected function nullResponse($content = null, $status = 200)
{
return new Response(null, $status);
}
@@ -66,9 +66,9 @@ class BaseController extends ContainerAware
/**
* Return a JSON response
*/
protected function jsonResponse($json_data)
protected function jsonResponse($json_data, $status = 200)
{
return new Response($json_data, 200, array('content-type' => 'application/json'));
return new Response($json_data, $status, array('content-type' => 'application/json'));
}
/**