Function __global->find_all_hooks

Definitions

sources/zones.php

  • Get an array of all the hook implementation names for a hook sub-type.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: array

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)
$check_custom boolean No No True N/A N/A Whether to consider and prioritise sources_custom hooks

Returns

  • A map of hook implementation name to [sources|sources_custom]
  • Type: array
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Get an array of all the hook implementation names for a hook sub-type.
 *
 * @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  boolean $check_custom Whether to consider and prioritise sources_custom hooks
 * @return array A map of hook implementation name to [sources|sources_custom]
 */

function find_all_hooks(string $type, string $subtype, bool $check_custom = true) : array