HasHooks
trait HasHooks
Properties
protected array | $hooks | Supported hooks: submitted, editing, saving, saved, deleting, deleted. |
Methods
$this
Response
callHooks(string $name, array $parameters = [])
Call hooks by giving name.
mixed
callEditing()
Call editing callbacks.
mixed
callSubmitted()
Call submitted callback.
mixed
callSaving()
Call saving callback.
mixed|null
callSaved()
Callback after saving a Model.
mixed
callDeleting(mixed $id)
Call hooks when deleting.
mixed
callDeleted()
No description
Details
at line 26
protected $this
registerHook(string $name, Closure $callback)
Register a hook.
at line 41
protected Response
callHooks(string $name, array $parameters = [])
Call hooks by giving name.
at line 65
$this
editing(Closure $callback)
Set after getting editing model callback.
at line 77
$this
submitted(Closure $callback)
Set submitted callback.
at line 89
$this
saving(Closure $callback)
Set saving callback.
at line 101
$this
saved(Closure $callback)
Set saved callback.
at line 111
$this
deleting(Closure $callback)
No description
at line 121
$this
deleted(Closure $callback)
No description
at line 131
protected mixed
callEditing()
Call editing callbacks.
at line 141
protected mixed
callSubmitted()
Call submitted callback.
at line 151
protected mixed
callSaving()
Call saving callback.
at line 161
protected mixed|null
callSaved()
Callback after saving a Model.
at line 173
protected mixed
callDeleting(mixed $id)
Call hooks when deleting.
at line 181
protected mixed
callDeleted()
No description