CMS  Version 3.9
CustomReportManager Class Reference

Static Public Member Functions

static registerManagerClass ($target, $managerClass, $description="")
 
static registerManagerClasses ()
 
static getManagerClass ($target)
 
static getManagerDescription ($target)
 
static createManager ($target)
 
static getTargets ()
 
static getTarget ($manager)
 

Detailed Description

Definition at line 7 of file custom_report_manager.inc.

Member Function Documentation

◆ createManager()

static CustomReportManager::createManager (   $target)
static

Definition at line 36 of file custom_report_manager.inc.

37  {
39  return ($class) ? new $class : null;
40  }
static getManagerClass($target)

◆ getManagerClass()

static CustomReportManager::getManagerClass (   $target)
static

Definition at line 22 of file custom_report_manager.inc.

23  {
25  $record = CustomReportManager::$managerClassMap[$target];
26  return ($record) ? $record["class"] : null;
27  }

◆ getManagerDescription()

static CustomReportManager::getManagerDescription (   $target)
static

Definition at line 29 of file custom_report_manager.inc.

30  {
32  $record = CustomReportManager::$managerClassMap[$target];
33  return ($record) ? $record["description"] : null;
34  }

◆ getTarget()

static CustomReportManager::getTarget (   $manager)
static

Definition at line 52 of file custom_report_manager.inc.

53  {
55  if (!count(CustomReportManager::$managerClassMap)) return "";
56 
57  $cl = get_class($manager);
58  foreach(CustomReportManager::$managerClassMap as $target => $record)
59  {
60  if ($record["class"] == $cl) return $target;
61  }
62 
63  return "";
64  }

◆ getTargets()

static CustomReportManager::getTargets ( )
static

Definition at line 42 of file custom_report_manager.inc.

43  {
45  if (!count(CustomReportManager::$managerClassMap)) return null;
46 
47  $targets = array_keys(CustomReportManager::$managerClassMap);
48  sort($targets);
49  return $targets;
50  }

◆ registerManagerClass()

static CustomReportManager::registerManagerClass (   $target,
  $managerClass,
  $description = "" 
)
static

Definition at line 11 of file custom_report_manager.inc.

12  {
13  CustomReportManager::$managerClassMap[$target] = array("class" => $managerClass, "description" => $description);
14  }

◆ registerManagerClasses()

static CustomReportManager::registerManagerClasses ( )
static

Definition at line 16 of file custom_report_manager.inc.

17  {
18  if (is_array(CustomReportManager::$managerClassMap)) return;
19  ComponentManager::fireEvent("RegisterCustomReportManagers");
20  }
static fireEvent($event, $parameter=null, $mustBeConsumed=false)
Fire an event to all subscribers as detailed in their manifests.

The documentation for this class was generated from the following file: