HasHooks
trait HasHooks
Properties
protected array | $hooks | Supported hooks: submitted, editing, saving, saved, deleting, deleted. |
Methods
$this
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 25
$this
editing(Closure $callback)
Set after getting editing model callback.
at line 37
$this
submitted(Closure $callback)
Set submitted callback.
at line 49
$this
saving(Closure $callback)
Set saving callback.
at line 61
$this
saved(Closure $callback)
Set saved callback.
at line 71
$this
deleting(Closure $callback)
No description
at line 81
$this
deleted(Closure $callback)
No description
at line 94
protected $this
registerHook(string $name, Closure $callback)
Register a hook.
at line 107
protected
callHooks(string $name, array $parameters = [])
Call hooks by giving name.
at line 129
protected mixed
callEditing()
Call editing callbacks.
at line 139
protected mixed
callSubmitted()
Call submitted callback.
at line 149
protected mixed
callSaving()
Call saving callback.
at line 159
protected mixed|null
callSaved()
Callback after saving a Model.
at line 171
protected mixed
callDeleting(mixed $id)
Call hooks when deleting.
at line 179
protected mixed
callDeleted()
No description