Function __global->hook_exists
Definitions
sources/zones.php
- Check if a given hook exists.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: bool
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $type | ID_TEXT | No | No | required parameter | blocks endpoints modules systems | N/A | The type of hook |
| $subtype | ID_TEXT | No | No | required parameter | N/A | N/A | The hook sub-type to find hook implementations for (e.g. the name of a module) |
| $hook | ID_TEXT | No | No | required parameter | N/A | N/A | The name of the hook |
Returns
- Whether or not the hook exists
- Type: boolean
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Check if a given hook exists.
*
* @param ID_TEXT $type The type of hook
* @set blocks endpoints modules systems
* @param ID_TEXT $subtype The hook sub-type to find hook implementations for (e.g. the name of a module)
* @param ID_TEXT $hook The name of the hook
* @return boolean Whether or not the hook exists
*/
function hook_exists(string $type, string $subtype, string $hook) : bool
* Check if a given hook exists.
*
* @param ID_TEXT $type The type of hook
* @set blocks endpoints modules systems
* @param ID_TEXT $subtype The hook sub-type to find hook implementations for (e.g. the name of a module)
* @param ID_TEXT $hook The name of the hook
* @return boolean Whether or not the hook exists
*/
function hook_exists(string $type, string $subtype, string $hook) : bool

