ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilPCPluggedGUI Class Reference

Class ilPCPluggedGUI. More...

+ Inheritance diagram for ilPCPluggedGUI:
+ Collaboration diagram for ilPCPluggedGUI:

Public Member Functions

 __construct (&$a_pg_obj, &$a_content_obj, $a_hier_id, $a_plugin_name="", $a_pc_id="")
 Constructor public. More...
 
 setPluginName ($a_pluginname)
 Set PluginName. More...
 
 getPluginName ()
 Get PluginName. More...
 
 executeCommand ()
 execute command More...
 
 insert ()
 Insert new section form. More...
 
 edit ($a_insert=false)
 Edit section form. More...
 
 createElement (array $a_properties)
 Create new element. More...
 
 updateElement (array $a_properties)
 Update element. More...
 
 returnToParent ()
 Return to parent. More...
 
- Public Member Functions inherited from ilPageContentGUI
 __construct ($a_pg_obj, $a_content_obj, $a_hier_id=0, $a_pc_id="")
 Constructor public. More...
 
 setContentObject ($a_val)
 Set content object. More...
 
 getContentObject ()
 Get content object. More...
 
 setPage ($a_val)
 Set page. More...
 
 getPage ()
 Get page. More...
 
 setPageConfig ($a_val)
 Set Page Config. More...
 
 getPageConfig ()
 Get Page Config. More...
 
 setStyleId ($a_styleid)
 Set Style Id. More...
 
 getStyleId ()
 Get Style Id. More...
 
 getStyle ()
 Get style object. More...
 
 setCharacteristics ($a_chars)
 Set Characteristics. More...
 
 getCharacteristics ()
 Get characteristics. More...
 
 getHierId ()
 get hierarchical id in dom object More...
 
 setHierId ($a_hier_id)
 get hierarchical id in dom object More...
 
 getBBMenu ($a_ta_name="par_content")
 Get the bb menu incl. More...
 
 delete ()
 delete content element More...
 
 moveAfter ()
 move content element after another element More...
 
 moveBefore ()
 move content element before another element More...
 
 splitPage ()
 split page to new page at specified position More...
 
 splitPageNext ()
 split page to next page at specified position More...
 
 displayValidationError ()
 display validation errors More...
 
 cancelCreate ()
 cancel creating page content More...
 
 cancelUpdate ()
 cancel update More...
 
 cancel ()
 Cancel. More...
 
 deactivate ()
 gui function set enabled if is not enabled and vice versa More...
 
 cut ()
 Cut single element. More...
 
 copy ()
 Copy single element. More...
 
 getTemplateOptions ($a_type)
 Get table templates. More...
 

Protected Attributes

 $plugin_admin
 
 $tabs
 
 $current_plugin = null
 
- Protected Attributes inherited from ilPageContentGUI
 $error
 
 $log
 

Additional Inherited Members

- Static Public Member Functions inherited from ilPageContentGUI
static _getCommonBBButtons ()
 Get common bb buttons. More...
 
- Data Fields inherited from ilPageContentGUI
 $content_obj
 
 $tpl
 
 $lng
 
 $ctrl
 
 $pg_obj
 
 $hier_id
 
 $dom
 
 $updated
 
 $target_script
 
 $return_location
 
 $page_config = null
 
- Static Public Attributes inherited from ilPageContentGUI
static $style_selector_reset = "margin-top:2px; margin-bottom:2px; text-indent:0px; position:static; float:none; width: auto;"
 
- Protected Member Functions inherited from ilPageContentGUI
 getCharacteristicsOfCurrentStyle ($a_type)
 Get characteristics of current style. More...
 
- Static Protected Attributes inherited from ilPageContentGUI
static $common_bb_buttons
 

Detailed Description

Class ilPCPluggedGUI.

User Interface for plugged page component

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

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

Constructor & Destructor Documentation

◆ __construct()

ilPCPluggedGUI::__construct ( $a_pg_obj,
$a_content_obj,
  $a_hier_id,
  $a_plugin_name = "",
  $a_pc_id = "" 
)

Constructor public.

Definition at line 37 of file class.ilPCPluggedGUI.php.

References $DIC, and setPluginName().

38  {
39  global $DIC;
40 
41  $this->ctrl = $DIC->ctrl();
42  $this->plugin_admin = $DIC["ilPluginAdmin"];
43  $this->tabs = $DIC->tabs();
44  $this->lng = $DIC->language();
45  $this->tpl = $DIC["tpl"];
46 
47  $this->setPluginName($a_plugin_name);
48  parent::__construct($a_pg_obj, $a_content_obj, $a_hier_id, $a_pc_id);
49  }
setPluginName($a_pluginname)
Set PluginName.
global $DIC
Definition: saml.php:7
+ Here is the call graph for this function:

Member Function Documentation

◆ createElement()

ilPCPluggedGUI::createElement ( array  $a_properties)

Create new element.

Definition at line 171 of file class.ilPCPluggedGUI.php.

References ilPageContentGUI\getPage().

172  {
173  $this->content_obj = new ilPCPlugged($this->getPage());
174  $this->content_obj->create(
175  $this->pg_obj,
176  $this->hier_id,
177  $this->pc_id,
178  $this->current_plugin->getPluginName(),
179  $this->current_plugin->getVersion()
180  );
181  $this->content_obj->setProperties($a_properties);
182  $this->updated = $this->pg_obj->update();
183  if ($this->updated === true) {
184  return true;
185  }
186  return false;
187  }
Class ilPCPlugged Plugged content object (see ILIAS DTD)
+ Here is the call graph for this function:

◆ edit()

ilPCPluggedGUI::edit (   $a_insert = false)

Edit section form.

Definition at line 131 of file class.ilPCPluggedGUI.php.

References ilPageContentGUI\$ctrl, $html, $ilCtrl, ilPageContentGUI\$lng, $plugin_admin, ilPageContentGUI\$tpl, ilPageComponentPlugin\CMD_EDIT, ilPageComponentPlugin\CMD_INSERT, ilPageContentGUI\displayValidationError(), ilPageContentGUI\getPage(), getPluginName(), and IL_COMP_SERVICE.

Referenced by insert().

132  {
134  $tpl = $this->tpl;
135  $lng = $this->lng;
136  $ilPluginAdmin = $this->plugin_admin;
137 
138  $this->displayValidationError();
139 
140  // edit form
141  if ($a_insert) {
142  $plugin_name = $this->getPluginName();
143  } else {
144  $plugin_name = $this->content_obj->getPluginName();
145  }
146  if ($ilPluginAdmin->isActive(IL_COMP_SERVICE, "COPage", "pgcp", $plugin_name)) {
147  $plugin_obj = $ilPluginAdmin->getPluginObject(
149  "COPage",
150  "pgcp",
151  $plugin_name
152  );
153  $plugin_obj->setPageObj($this->getPage());
154  $gui_obj = $plugin_obj->getUIClassInstance();
155  $gui_obj->setPCGUI($this);
156  if ($a_insert) {
157  $gui_obj->setMode(ilPageComponentPlugin::CMD_INSERT);
158  } else {
159  $gui_obj->setMode(ilPageComponentPlugin::CMD_EDIT);
160  }
161  $html = $ilCtrl->getHTML($gui_obj);
162  }
163 
164  $tpl->setContent($html);
165  }
global $ilCtrl
Definition: ilias.php:18
displayValidationError()
display validation errors
getPluginName()
Get PluginName.
$html
Definition: example_001.php:87
const IL_COMP_SERVICE
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ executeCommand()

ilPCPluggedGUI::executeCommand ( )

execute command

Definition at line 74 of file class.ilPCPluggedGUI.php.

References ilPageContentGUI\$ctrl, $ilCtrl, ilPageContentGUI\$lng, $plugin_admin, $ret, $tabs, ilPageContentGUI\getPage(), IL_COMP_SERVICE, and setPluginName().

75  {
76  $ilPluginAdmin = $this->plugin_admin;
77  $ilTabs = $this->tabs;
78  $lng = $this->lng;
80 
81  $ilTabs->setBackTarget($lng->txt("pg"), $ilCtrl->getLinkTarget($this, "returnToParent"));
82 
83  // get next class that processes or forwards current command
84  $next_class = $this->ctrl->getNextClass($this);
85 
86  // get all plugins and check, whether next class belongs to one
87  // of them, then forward
88  $pl_names = $ilPluginAdmin->getActivePluginsForSlot(
90  "COPage",
91  "pgcp"
92  );
93  foreach ($pl_names as $pl_name) {
94  if ($next_class == strtolower("il" . $pl_name . "plugingui")) {
95  $plugin = $ilPluginAdmin->getPluginObject(
97  "COPage",
98  "pgcp",
99  $pl_name
100  );
101  $plugin->setPageObj($this->getPage());
102  $this->current_plugin = $plugin;
103  $this->setPluginName($pl_name);
104  $gui_obj = $plugin->getUIClassInstance();
105  $gui_obj->setPCGUI($this);
106  $ret = $this->ctrl->forwardCommand($gui_obj);
107  }
108  }
109 
110  // get current command
111  $cmd = $this->ctrl->getCmd();
112 
113  if ($next_class == "" || $next_class == "ilpcpluggedgui") {
114  $ret = $this->$cmd();
115  }
116 
117  return $ret;
118  }
setPluginName($a_pluginname)
Set PluginName.
global $ilCtrl
Definition: ilias.php:18
$ret
Definition: parser.php:6
const IL_COMP_SERVICE
+ Here is the call graph for this function:

◆ getPluginName()

ilPCPluggedGUI::getPluginName ( )

Get PluginName.

Returns
string PluginName

Definition at line 66 of file class.ilPCPluggedGUI.php.

Referenced by edit().

67  {
68  return $this->pluginname;
69  }
+ Here is the caller graph for this function:

◆ insert()

ilPCPluggedGUI::insert ( )

Insert new section form.

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

References edit().

124  {
125  $this->edit(true);
126  }
edit($a_insert=false)
Edit section form.
+ Here is the call graph for this function:

◆ returnToParent()

ilPCPluggedGUI::returnToParent ( )

Return to parent.

Definition at line 206 of file class.ilPCPluggedGUI.php.

207  {
208  $this->ctrl->returnToParent($this, "jump" . $this->hier_id);
209  }

◆ setPluginName()

ilPCPluggedGUI::setPluginName (   $a_pluginname)

Set PluginName.

Parameters
string$a_pluginnamePluginName

Definition at line 56 of file class.ilPCPluggedGUI.php.

Referenced by __construct(), and executeCommand().

57  {
58  $this->pluginname = $a_pluginname;
59  }
+ Here is the caller graph for this function:

◆ updateElement()

ilPCPluggedGUI::updateElement ( array  $a_properties)

Update element.

Definition at line 192 of file class.ilPCPluggedGUI.php.

193  {
194  $this->content_obj->setProperties($a_properties);
195  $this->content_obj->setPluginVersion($this->current_plugin->getVersion());
196  $this->updated = $this->pg_obj->update();
197  if ($this->updated === true) {
198  return true;
199  }
200  return false;
201  }

Field Documentation

◆ $current_plugin

ilPCPluggedGUI::$current_plugin = null
protected

Definition at line 31 of file class.ilPCPluggedGUI.php.

◆ $plugin_admin

ilPCPluggedGUI::$plugin_admin
protected

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

Referenced by edit(), and executeCommand().

◆ $tabs

ilPCPluggedGUI::$tabs
protected

Definition at line 29 of file class.ilPCPluggedGUI.php.

Referenced by executeCommand().


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