Function Module_admin_stats->templatify_graph

Definitions

adminzone/pages/modules/admin_stats.php

  • Make a specific graph template-ready.
  • Visibility: protected
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: array

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$graph_name string No No required parameter N/A N/A The UI
$hook_ob object No No required parameter N/A N/A Hook object
$graph_details array No No required parameter N/A N/A Graph details
$graph_final_details ?array No No Null N/A N/A Graph data (null: look it up using $graph_name etc)
$filters array No No [] N/A N/A Filter settings to take precedence
$pivot ?mixed No No Null N/A N/A Pivot value to take precedence (null: none)
$include_form boolean No No True N/A N/A Whether to include a form
$for_kpi boolean No No False N/A N/A Whether this is for setting up a KPI

Returns

  • The UI
  • Type: array
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Make a specific graph template-ready.
 *
 * @param  string $graph_name The UI
 * @param  object $hook_ob Hook object
 * @param  array $graph_details Graph details
 * @param  ?array $graph_final_details Graph data (null: look it up using $graph_name etc)
 * @param  array $filters Filter settings to take precedence
 * @param  ?mixed $pivot Pivot value to take precedence (null: none)
 * @param  boolean $include_form Whether to include a form
 * @param  boolean $for_kpi Whether this is for setting up a KPI
 * @return array The UI
 */

protected function templatify_graph(string $graph_name, object $hook_ob, array $graph_details, ?array $graph_final_details = null, array $filters = [], $pivot = null, bool $include_form = true, bool $for_kpi = false) : array