This is the ControllerProvider offering all CRUD pages.
It offers this routes:
"/resource/static" serving static resources
"/{entity}/create" creation page of the entity
"/{entity}" list page of the entity
"/{entity}/{id}" details page of a single entity instance
"/{entity}/{id}/edit" edit page of a single entity instance
"/{entity}/{id}/delete" POST only deletion route for an entity instance
"/{entity}/{id}/{field}/file" renders a file field of an entity instance
"/{entity}/{id}/{field}/delete" POST only deletion of a file field of an entity instance
Methods summary
protected
Symfony\Component\HttpFoundation\Response
|
#
getNotFoundPage( Silex\Application $app, string $error )
Generates the not found page.
Generates the not found page.
Parameters
- $app
- the Silex application
- $error
- the cause of the not found error
Returns
Symfony\Component\HttpFoundation\Response the rendered not found page with the status code 404
|
protected
string
|
#
getLayout( Silex\Application $app, string $action, string $entity )
Delivers the layout for the page in the way it is described in the
manual.
Delivers the layout for the page in the way it is described in the
manual.
Parameters
- $app
- the Silex application
- $action
- the current calling action like "create" or "show"
- $entity
- the current calling entity
Returns
string the best fitting layout
|
public
SilexController\Collection
|
#
connect( Silex\Application $app )
Implements ControllerProviderInterface::connect() connecting this
controller.
Implements ControllerProviderInterface::connect() connecting this
controller.
Parameters
- $app
- the Application instance of the Silex application
Returns
SilexController\Collection this method is expected to return the used ControllerCollection instance
|
public
Symfony\Component\HttpFoundation\Response
|
#
create( Silex\Application $app, string $entity )
The controller for the "create" action.
The controller for the "create" action.
Parameters
- $app
- the Silex application
- $entity
- the current entity
Returns
Symfony\Component\HttpFoundation\Response the HTTP response of this action
|
public
Symfony\Component\HttpFoundation\Response
|
#
showList( Silex\Application $app, string $entity )
The controller for the "show list" action.
The controller for the "show list" action.
Parameters
- $app
- the Silex application
- $entity
- the current entity
Returns
Symfony\Component\HttpFoundation\Response the HTTP response of this action or 404 on invalid input
|
public
Symfony\Component\HttpFoundation\Response
|
#
show( Silex\Application $app, string $entity, string $id )
The controller for the "show" action.
The controller for the "show" action.
Parameters
- $app
- the Silex application
- $entity
- the current entity
- $id
- the instance id to show
Returns
Symfony\Component\HttpFoundation\Response the HTTP response of this action or 404 on invalid input
|
public
Symfony\Component\HttpFoundation\Response
|
#
edit( Silex\Application $app, string $entity, string $id )
The controller for the "edit" action.
The controller for the "edit" action.
Parameters
- $app
- the Silex application
- $entity
- the current entity
- $id
- the instance id to edit
Returns
Symfony\Component\HttpFoundation\Response the HTTP response of this action or 404 on invalid input
|
public
Symfony\Component\HttpFoundation\Response
|
#
delete( Silex\Application $app, string $entity, string $id )
The controller for the "delete" action.
The controller for the "delete" action.
Parameters
- $app
- the Silex application
- $entity
- the current entity
- $id
- the instance id to delete
Returns
Symfony\Component\HttpFoundation\Response redirects to the entity list page or 404 on invalid input
|
public
Symfony\Component\HttpFoundation\Response
|
#
renderFile( Silex\Application $app, string $entity, string $id, string $field )
The controller for the "render file" action.
The controller for the "render file" action.
Parameters
- $app
- the Silex application
- $entity
- the current entity
- $id
- the instance id
- $field
- the field of the file to render of the instance
Returns
Symfony\Component\HttpFoundation\Response the rendered file
|
public
Symfony\Component\HttpFoundation\Response
|
#
deleteFile( Silex\Application $app, string $entity, string $id, string $field )
The controller for the "delete file" action.
The controller for the "delete file" action.
Parameters
- $app
- the Silex application
- $entity
- the current entity
- $id
- the instance id
- $field
- the field of the file to delete of the instance
Returns
Symfony\Component\HttpFoundation\Response redirects to the instance details page or 404 on invalid input
|
public
Symfony\Component\HttpFoundation\Response
|
#
staticFile( Silex\Application $app )
The controller for serving static files.
The controller for serving static files.
Parameters
- $app
- the Silex application
Returns
Symfony\Component\HttpFoundation\Response redirects to the instance details page or 404 on invalid input
|