$modelCommit->hook()
Runs the given hook and modifies the first argument of the given arguments array. It returns an array with arguments and result keys.
$modelCommit->hook('after'|'before' $hook, array $arguments): array{arguments: array, result: mixed}
Parameters
| Name | Type | Default |
|---|---|---|
| $hookrequired | 'after'or'before' |
no default value |
| $argumentsrequired | array<string, mixed> |
no default value |
Return type
array{arguments: array<string, mixed>, result: mixed}