Function Hook_Notification->_create_category_tree

Definitions

sources/notifications.php

  • Standard function to create the standardised category tree. This base version will do it based on seeing what is already being monitored, i.e. so you can unmonitor them. It assumes monitoring is initially set from the frontend via the monitor button.
  • Visibility: protected
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: array

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$notification_code ID_TEXT No No required parameter N/A N/A Notification code
$id ?ID_TEXT No No required parameter N/A N/A The ID of where we're looking under (null: N/A)
$for_any_member boolean No No False N/A N/A Whether to list anything monitored by any member (useful if you are calling this because you can't naturally enumerate what can be monitored)

Returns

  • Tree structure
  • Type: array
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Standard function to create the standardised category tree. This base version will do it based on seeing what is already being monitored, i.e. so you can unmonitor them. It assumes monitoring is initially set from the frontend via the monitor button.
 *
 * @param  ID_TEXT $notification_code Notification code
 * @param  ?ID_TEXT $id The ID of where we're looking under (null: N/A)
 * @param  boolean $for_any_member Whether to list anything monitored by any member (useful if you are calling this because you can't naturally enumerate what can be monitored)
 * @return array Tree structure
 */

protected function _create_category_tree(string $notification_code, ?string $id, bool $for_any_member = false) : array