ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
ilUIHookProcessor Class Reference

UI interface hook processor. More...

+ Collaboration diagram for ilUIHookProcessor:

Public Member Functions

 __construct ($a_comp, $a_part, $a_pars)
 Constructor. More...
 
 replaced ()
 Should HTML be replaced completely? More...
 
 getHTML ($html)
 Get HTML. More...
 

Data Fields

 $append = array()
 
 $prepend = array()
 
 $replace = ""
 

Detailed Description

UI interface hook processor.

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

Definition at line 12 of file class.ilUIHookProcessor.php.

Constructor & Destructor Documentation

◆ __construct()

ilUIHookProcessor::__construct (   $a_comp,
  $a_part,
  $a_pars 
)

Constructor.

Parameters

return

Definition at line 24 of file class.ilUIHookProcessor.php.

25 {
26 global $ilPluginAdmin;
27
28 include_once("./Services/UIComponent/classes/class.ilUIHookPluginGUI.php");
29
30 // user interface hook [uihk]
31 $pl_names = $ilPluginAdmin->getActivePluginsForSlot(IL_COMP_SERVICE, "UIComponent", "uihk");
32 $this->replaced = false;
33 foreach ($pl_names as $pl)
34 {
35 $ui_plugin = ilPluginAdmin::getPluginObject(IL_COMP_SERVICE, "UIComponent", "uihk", $pl);
36 $gui_class = $ui_plugin->getUIClassInstance();
37 $resp = $gui_class->getHTML($a_comp, $a_part, $a_pars);
38
39 if ($resp["mode"] != ilUIHookPluginGUI::KEEP)
40 {
41 switch($resp["mode"])
42 {
44 $this->prepend[] = $resp["html"];
45 break;
46
48 $this->append[] = $resp["html"];
49 break;
50
52 if (!$this->replaced)
53 {
54 $this->replace = $resp["html"];
55 $this->replaced = true;
56 }
57 break;
58 }
59 }
60 }
61 }
const IL_COMP_SERVICE
static getPluginObject($a_ctype, $a_cname, $a_slot_id, $a_pname)
Get Plugin Object.
replaced()
Should HTML be replaced completely?

References ilUIHookPluginGUI\APPEND, ilPluginAdmin\getPluginObject(), IL_COMP_SERVICE, ilUIHookPluginGUI\KEEP, ilUIHookPluginGUI\PREPEND, ilUIHookPluginGUI\REPLACE, and replaced().

+ Here is the call graph for this function:

Member Function Documentation

◆ getHTML()

ilUIHookProcessor::getHTML (   $html)

Get HTML.

Parameters
string$htmlhtml
Returns
string html

Definition at line 79 of file class.ilUIHookProcessor.php.

80 {
81 if ($this->replaced)
82 {
84 }
85 foreach ($this->append as $a)
86 {
87 $html.= $a;
88 }
89 foreach ($this->prepend as $p)
90 {
91 $html = $p.$html;
92 }
93 return $html;
94 }
$html
Definition: example_001.php:87

References $html, $replace, and replaced().

+ Here is the call graph for this function:

◆ replaced()

ilUIHookProcessor::replaced ( )

Should HTML be replaced completely?

Returns

Definition at line 68 of file class.ilUIHookProcessor.php.

69 {
70 return $this->replaced;
71 }

Referenced by __construct(), and getHTML().

+ Here is the caller graph for this function:

Field Documentation

◆ $append

ilUIHookProcessor::$append = array()

Definition at line 14 of file class.ilUIHookProcessor.php.

◆ $prepend

ilUIHookProcessor::$prepend = array()

Definition at line 15 of file class.ilUIHookProcessor.php.

◆ $replace

ilUIHookProcessor::$replace = ""

Definition at line 16 of file class.ilUIHookProcessor.php.

Referenced by getHTML().


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