ILIAS  Release_4_4_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilUIHookProcessor Class Reference

UI interface hook processor. More...

+ Collaboration diagram for ilUIHookProcessor:

Public Member Functions

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

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

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

Constructor.

Parameters
@return

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

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

{
global $ilPluginAdmin;
include_once("./Services/UIComponent/classes/class.ilUIHookPluginGUI.php");
// user interface hook [uihk]
$pl_names = $ilPluginAdmin->getActivePluginsForSlot(IL_COMP_SERVICE, "UIComponent", "uihk");
$this->replaced = false;
foreach ($pl_names as $pl)
{
$ui_plugin = ilPluginAdmin::getPluginObject(IL_COMP_SERVICE, "UIComponent", "uihk", $pl);
$gui_class = $ui_plugin->getUIClassInstance();
$resp = $gui_class->getHTML($a_comp, $a_part, $a_pars);
if ($resp["mode"] != ilUIHookPluginGUI::KEEP)
{
switch($resp["mode"])
{
$this->prepend[] = $resp["html"];
break;
$this->append[] = $resp["html"];
break;
if (!$this->replaced)
{
$this->replace = $resp["html"];
$this->replaced = true;
}
break;
}
}
}
}

+ Here is the call graph for this function:

Member Function Documentation

ilUIHookProcessor::getHTML (   $html)

Get HTML.

Parameters
string$htmlhtml
Returns
string html

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

References $replace, and replaced().

{
if ($this->replaced)
{
$html = $this->replace;
}
foreach ($this->append as $a)
{
$html.= $a;
}
foreach ($this->prepend as $p)
{
$html = $p.$html;
}
return $html;
}

+ Here is the call graph for this function:

ilUIHookProcessor::replaced ( )

Should HTML be replaced completely?

Returns

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

Referenced by __construct(), and getHTML().

{
return $this->replaced;
}

+ Here is the caller graph for this function:

Field Documentation

ilUIHookProcessor::$append = array()

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

ilUIHookProcessor::$prepend = array()

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

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: