Documentation

FavoritesController extends AppController
in package

Favorites Controller

Table of Contents

Properties

$Favorites  : FavoritesTable

Methods

add()  : Response|null|void
Add method
beforeRender()  : mixed
delete()  : Response|null
Delete method
edit()  : Response|null|void
Edit method
index()  : Response|null|void
Index method
initialize()  : void
Initialization hook method.
view()  : Response|null|void
View method

Properties

Methods

add()

Add method

public add() : Response|null|void
Return values
Response|null|void

Redirects on successful add, renders view otherwise.

beforeRender()

public beforeRender(EventInterface $event) : mixed
Parameters
$event : EventInterface

delete()

Delete method

public delete([string|null $id = null ]) : Response|null
Parameters
$id : string|null = null

Favorite id.

Tags
throws
RecordNotFoundException

When record not found.

Return values
Response|null

Redirects to index.

edit()

Edit method

public edit([string|null $id = null ]) : Response|null|void
Parameters
$id : string|null = null

Favorite id.

Tags
throws
RecordNotFoundException

When record not found.

Return values
Response|null|void

Redirects on successful edit, renders view otherwise.

index()

Index method

public index() : Response|null|void
Return values
Response|null|void

Renders view

initialize()

Initialization hook method.

public initialize() : void

Use this method to add common initialization code like loading components.

e.g. $this->loadComponent('FormProtection');

view()

View method

public view([string|null $id = null ]) : Response|null|void
Parameters
$id : string|null = null

Favorite id.

Tags
throws
RecordNotFoundException

When record not found.

Return values
Response|null|void

Renders view


        
On this page

Search results