Method | Description | |
---|---|---|
connect ( Silex\Application $app ) : SilexController\Collection | Implements ControllerProviderInterface::connect() connecting this controller. | |
create ( Silex\Application $app, string $entity ) : |
The controller for the "create" action. | |
delete ( Silex\Application $app, string $entity, string $id ) : |
The controller for the "delete" action. | |
deleteFile ( Silex\Application $app, string $entity, string $id, string $field ) : |
The controller for the "delete file" action. | |
edit ( Silex\Application $app, string $entity, string $id ) : |
The controller for the "edit" action. | |
renderFile ( Silex\Application $app, string $entity, string $id, string $field ) : |
The controller for the "render file" action. | |
setLocale ( |
The controller for setting the locale. | |
show ( Silex\Application $app, string $entity, string $id ) : |
The controller for the "show" action. | |
showList ( |
The controller for the "show list" action. | |
staticFile ( |
The controller for serving static files. |
Method | Description | |
---|---|---|
buildUpListFilter ( |
Builds up the parameters of the list page filters. | |
getAfterDeleteRedirectParameters ( |
Gets the parameters for the redirection after deleting an entity. | |
getNotFoundPage ( Silex\Application $app, string $error ) : |
Generates the not found page. | |
modifyEntity ( Silex\Application $app, |
Validates and saves the new or updated entity and returns the appropriate HTTP response. | |
modifyFilesAndSetFlashBag ( Silex\Application $app, |
Postprocesses the entity after modification by handling the uploaded files and setting the flash. | |
setValidationFailedFlashes ( Silex\Application $app, boolean $optimisticLocking, string $mode ) | Sets the flashes of a failed entity modification. | |
setupI18n ( Silex\Application $app ) | Setups i18n. | |
setupRoutes ( Silex\Application $app ) : mixed | Setups the routes. | |
setupTemplates ( Silex\Application $app ) | Setups the templates. |
protected buildUpListFilter ( |
||
$request | the current application | |
$definition | the current entity definition | |
$filterActive | boolean | reference, will be true if at least one filter is active |
$filterToUse | array | reference, will hold a map of fields to integers (0 or 1) which boolean filters are active |
$filterOperators | array | reference, will hold a map of fields to operators for AbstractData::listEntries() |
public connect ( Silex\Application $app ) : SilexController\Collection | ||
$app | Silex\Application | the Application instance of the Silex application |
return | SilexController\Collection | this method is expected to return the used ControllerCollection instance |
public delete ( Silex\Application $app, string $entity, string $id ) : |
||
$app | Silex\Application | the Silex application |
$entity | string | the current entity |
$id | string | the instance id to delete |
return | redirects to the entity list page or 404 on invalid input |
public deleteFile ( Silex\Application $app, string $entity, string $id, string $field ) : |
||
$app | Silex\Application | the Silex application |
$entity | string | the current entity |
$id | string | the instance id |
$field | string | the field of the file to delete of the instance |
return | redirects to the instance details page or 404 on invalid input |
protected getAfterDeleteRedirectParameters ( |
||
$request | the current request | |
$entity | string | the entity name |
$redirectPage | string | reference, where the page to redirect to will be stored |
return | string>\array |
protected getNotFoundPage ( Silex\Application $app, string $error ) : |
||
$app | Silex\Application | the Silex application |
$error | string | the cause of the not found error |
return | the rendered not found page with the status code 404 |
protected modifyEntity ( Silex\Application $app, |
||
$app | Silex\Application | the current application |
$crudData | the data instance of the entity | |
$instance | the entity | |
$entity | string | the name of the entity |
$edit | boolean | whether to edit (true) or to create (false) the entity |
return | the HTTP response of this modification |
protected modifyFilesAndSetFlashBag ( Silex\Application $app, |
||
$app | Silex\Application | the current application |
$crudData | the data instance of the entity | |
$instance | the entity | |
$entity | string | the name of the entity |
$mode | string | whether to 'edit' or to 'create' the entity |
return | null | |
the HTTP response of this modification |
public renderFile ( Silex\Application $app, string $entity, string $id, string $field ) : |
||
$app | Silex\Application | the Silex application |
$entity | string | the current entity |
$id | string | the instance id |
$field | string | the field of the file to render of the instance |
return | the rendered file |
public setLocale ( |
||
$request | the current request | |
$app | Silex\Application | the Silex application |
$locale | string | the new locale |
return | redirects to the instance details page or 404 on invalid input |
protected setValidationFailedFlashes ( Silex\Application $app, boolean $optimisticLocking, string $mode ) | ||
$app | Silex\Application | the current application |
$optimisticLocking | boolean | whether the optimistic locking failed |
$mode | string | the modification mode, either 'create' or 'edit' |
protected setupI18n ( Silex\Application $app ) | ||
$app | Silex\Application | the Application instance of the Silex application |
protected setupRoutes ( Silex\Application $app ) : mixed | ||
$app | Silex\Application | the Application instance of the Silex application |
return | mixed | the created controller factory |
protected setupTemplates ( Silex\Application $app ) | ||
$app | Silex\Application | the Application instance of the Silex application |
public showList ( |
||
$request | the current request | |
$app | Silex\Application | the Silex application |
$entity | string | the current entity |
return | the HTTP response of this action or 404 on invalid input |
public staticFile ( |
||
$request | the current request | |
$app | Silex\Application | the Silex application |
return | redirects to the instance details page or 404 on invalid input |