PHP Class Bolt\Controller\Backend\Records

Prior to v3.0 this functionality primarily existed in the monolithic Bolt\Controllers\Backend class.
Author: Gawain Lynch ([email protected])
Inheritance: extends BackendBase
Mostra file Open project: bolt/bolt Class Usage Examples

Public Methods

Method Description
edit ( Request $request, string $contenttypeslug, integer $id ) : TemplateResponse | RedirectResponse Edit a record, or create a new one.
overview ( Request $request, string $contenttypeslug ) : TemplateResponse | RedirectResponse Content type overview page.
related ( Request $request, string $contenttypeslug, integer $id ) : TemplateResponse | RedirectResponse Get related records.

Protected Methods

Method Description
addRoutes ( Silex\ControllerCollection $c )
recordEdit ( ) : Edit
recordListing ( ) : Bolt\Storage\ContentRequest\Listing
recordSave ( ) : Save

Private Methods

Method Description
checkEditAccess ( string $contenttypeslug, integer $id ) : boolean | RedirectResponse Check that the user is allowed to edit the record.
setEditReferrer ( Request $request ) : void Set the editreferrer in twig if it was not set yet.

Method Details

addRoutes() protected method

protected addRoutes ( Silex\ControllerCollection $c )
$c Silex\ControllerCollection

edit() public method

Edit a record, or create a new one.
public edit ( Request $request, string $contenttypeslug, integer $id ) : TemplateResponse | RedirectResponse
$request Symfony\Component\HttpFoundation\Request The Symfony Request
$contenttypeslug string The content type slug
$id integer The content ID
return Bolt\Response\TemplateResponse | Symfony\Component\HttpFoundation\RedirectResponse

overview() public method

Content type overview page.
public overview ( Request $request, string $contenttypeslug ) : TemplateResponse | RedirectResponse
$request Symfony\Component\HttpFoundation\Request The Symfony Request
$contenttypeslug string The content type slug
return Bolt\Response\TemplateResponse | Symfony\Component\HttpFoundation\RedirectResponse

recordEdit() protected method

protected recordEdit ( ) : Edit
return Bolt\Storage\ContentRequest\Edit

recordListing() protected method

protected recordListing ( ) : Bolt\Storage\ContentRequest\Listing
return Bolt\Storage\ContentRequest\Listing

recordSave() protected method

protected recordSave ( ) : Save
return Bolt\Storage\ContentRequest\Save