Inserts a function into designated places in the model’s logic. See the Hooks Reference for a complete list of possible hooks and the function signatures necessary to use them.
This method is aliased by the
@model.hook function decorator, which is the preferred way to hook functions.
place — str, required
The name of the hook in which to insert the function.
func — func(mixed), required
The function to be hooked in
place. The function's signature will depend on the hook. See the Hooks Reference.
prioritize — bool, optional
Run the hook before all existing hooks in the queue. Note this parameter does not affect the position of the hook with respect to future functions added to the same hook.
Default value: False