ILIAS  release_7 Revision v7.30-3-g800a261c036
All Data Structures Namespaces Files Functions Variables Modules Pages
ilUIHookPluginGUI Class Reference

Class ilUIHookPluginGUI. More...

+ Collaboration diagram for ilUIHookPluginGUI:

Public Member Functions

 setPluginObject ($a_val)
 
 getPluginObject ()
 
 getHTML ($a_comp, $a_part, $a_par=array())
 
 modifyGUI ($a_comp, $a_part, $a_par=array())
 
 modifyHTML ($a_def_html, $a_resp)
 
 gotoHook ()
 Goto script hook. More...
 
 checkGotoHook ($a_target)
 Goto script hook. More...
 

Data Fields

const UNSPECIFIED = ''
 
const KEEP = ''
 
const REPLACE = 'r'
 
const APPEND = 'a'
 
const PREPEND = 'p'
 

Protected Attributes

 $plugin_object = null
 

Detailed Description

Member Function Documentation

◆ checkGotoHook()

ilUIHookPluginGUI::checkGotoHook (   $a_target)

Goto script hook.

Can be used to interfere with the goto script behaviour

Definition at line 133 of file class.ilUIHookPluginGUI.php.

134  {
135  return array('target' => false);
136  }

◆ getHTML()

ilUIHookPluginGUI::getHTML (   $a_comp,
  $a_part,
  $a_par = array() 
)
Parameters
string$a_compcomponent
string$a_partstring that identifies the part of the UI that is handled
array$a_pararray of parameters (depend on $a_comp and $a_part)
Returns
array array with entries "mode" => modification mode, "html" => your html
Deprecated:
Note this method is deprecated. There are several issues with hacking into already rendered html as provided here:
  • The generation of html might be performed twice (especially if REPLACE is used).
  • There is limited access to data used to generate the original html. If needed this data needs to be gathered again.
  • If an element inside the html needs to be changed, some crude string replace magic is needed.

Modify HTML output of GUI elements. Modifications modes are:

Definition at line 62 of file class.ilUIHookPluginGUI.php.

63  {
64  return array('mode' => self::KEEP, 'html' => '');
65  }

◆ getPluginObject()

ilUIHookPluginGUI::getPluginObject ( )
final
Returns
ilUserInterfaceHookPlugin

Definition at line 36 of file class.ilUIHookPluginGUI.php.

References $plugin_object.

37  {
38  return $this->plugin_object;
39  }

◆ gotoHook()

ilUIHookPluginGUI::gotoHook ( )

Goto script hook.

Can be used to interfere with the goto script behaviour

Definition at line 123 of file class.ilUIHookPluginGUI.php.

124  {
125  }

◆ modifyGUI()

ilUIHookPluginGUI::modifyGUI (   $a_comp,
  $a_part,
  $a_par = array() 
)
Parameters
string$a_compcomponent
string$a_partstring that identifies the part of the UI that is handled
array$a_pararray of parameters (depend on $a_comp and $a_part)
Deprecated:
Note this method is deprecated. User Interface components are migrated towards the UIComponents and Global Screen which do not make use of the mechanism provided here. Make use of the extension possibilities provided by Global Screen and UI Components instead.

In ILIAS 6.0 still working for working for:

  • $a_comp="Services/Ini" ; $a_part="init_style"
  • $a_comp="" ; $a_part="tabs"
  • $a_comp="" ; $a_part="sub_tabs"

Allows to modify user interface objects before they generate their output.

Definition at line 85 of file class.ilUIHookPluginGUI.php.

86  {
87  }

◆ modifyHTML()

ilUIHookPluginGUI::modifyHTML (   $a_def_html,
  $a_resp 
)
final
Parameters
stringdefault html
stringresponse from plugin
Returns
string modified html
Deprecated:
Reason, see getHTML

Modify HTML based on default html and plugin response

Definition at line 100 of file class.ilUIHookPluginGUI.php.

101  {
102  switch ($a_resp['mode']) {
103  case self::REPLACE:
104  $a_def_html = $a_resp['html'];
105  break;
106  case self::APPEND:
107  $a_def_html .= $a_resp['html'];
108  break;
109  case self::PREPEND:
110  $a_def_html = $a_resp['html'] . $a_def_html;
111  break;
112  }
113 
114  return $a_def_html;
115  }

◆ setPluginObject()

ilUIHookPluginGUI::setPluginObject (   $a_val)
final
Parameters
ilUserInterfaceHookPlugin$a_val

Definition at line 27 of file class.ilUIHookPluginGUI.php.

28  {
29  $this->plugin_object = $a_val;
30  }

Field Documentation

◆ $plugin_object

ilUIHookPluginGUI::$plugin_object = null
protected

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

Referenced by getPluginObject().

◆ APPEND

const ilUIHookPluginGUI::APPEND = 'a'

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

◆ KEEP

◆ PREPEND

const ilUIHookPluginGUI::PREPEND = 'p'

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

◆ REPLACE

const ilUIHookPluginGUI::REPLACE = 'r'

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

◆ UNSPECIFIED

const ilUIHookPluginGUI::UNSPECIFIED = ''

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


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