ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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 = ""
 

Protected Attributes

 $plugin_admin
 

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 29 of file class.ilUIHookProcessor.php.

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

References $DIC, 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 83 of file class.ilUIHookProcessor.php.

84 {
85 if ($this->replaced) {
87 }
88 foreach ($this->append as $a) {
89 $html .= $a;
90 }
91 foreach ($this->prepend as $p) {
92 $html = $p . $html;
93 }
94 return $html;
95 }
$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 72 of file class.ilUIHookProcessor.php.

73 {
74 return $this->replaced;
75 }

Referenced by __construct(), and getHTML().

+ Here is the caller graph for this function:

Field Documentation

◆ $append

ilUIHookProcessor::$append = array()

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

◆ $plugin_admin

ilUIHookProcessor::$plugin_admin
protected

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

◆ $prepend

ilUIHookProcessor::$prepend = array()

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

◆ $replace

ilUIHookProcessor::$replace = ""

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

Referenced by getHTML().


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