ILIAS  release_7 Revision v7.30-3-g800a261c036
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 @access 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 @access 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...
 
 getCharacteristicsOfCurrentStyle ($a_type)
 Get characteristics of current style. 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
 redirectToParent ($hier_id="")
 Redirect to parent. More...
 
 getParentReturn ($hier_id="")
 
- 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 @access public.

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

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: goto.php:24
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc

References $DIC, ILIAS\GlobalScreen\Provider\__construct(), and setPluginName().

+ Here is the call graph for this function:

Member Function Documentation

◆ createElement()

ilPCPluggedGUI::createElement ( array  $a_properties)

Create new element.

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

174 {
175 $this->content_obj = new ilPCPlugged($this->getPage());
176 $this->content_obj->create(
177 $this->pg_obj,
178 $this->hier_id,
179 $this->pc_id,
180 $this->current_plugin->getPluginName(),
181 $this->current_plugin->getVersion()
182 );
183 $this->content_obj->setProperties($a_properties);
184 $this->updated = $this->pg_obj->update();
185 if ($this->updated === true) {
186 return true;
187 }
188 return false;
189 }
Class ilPCPlugged Plugged content object (see ILIAS DTD)

References ilPageContentGUI\getPage().

+ 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.

132 {
133 $ilCtrl = $this->ctrl;
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 if ($html != "") {
165 $tpl->setContent($html);
166 }
167 }
const IL_COMP_SERVICE
getPluginName()
Get PluginName.
displayValidationError()
display validation errors

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

Referenced by insert().

+ 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.

75 {
76 $ilPluginAdmin = $this->plugin_admin;
77 $ilTabs = $this->tabs;
79 $ilCtrl = $this->ctrl;
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 }
$ret
Definition: parser.php:6

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

+ 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.

67 {
68 return $this->pluginname;
69 }

Referenced by edit().

+ Here is the caller graph for this function:

◆ insert()

ilPCPluggedGUI::insert ( )

Insert new section form.

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

124 {
125 $this->edit(true);
126 }
edit($a_insert=false)
Edit section form.

References edit().

+ Here is the call graph for this function:

◆ returnToParent()

ilPCPluggedGUI::returnToParent ( )

Return to parent.

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

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

◆ setPluginName()

ilPCPluggedGUI::setPluginName (   $a_pluginname)

Set PluginName.

Parameters
string$a_pluginnamePluginName

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

57 {
58 $this->pluginname = $a_pluginname;
59 }

Referenced by __construct(), and executeCommand().

+ Here is the caller graph for this function:

◆ updateElement()

ilPCPluggedGUI::updateElement ( array  $a_properties)

Update element.

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

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

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: