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: public
  • 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)

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)
 * @return array Tree structure
 */

public function create_category_tree(string $notification_code, ?string $id) : array