ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
class.ilPageComponentPluginGUI.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 1998-2013 ILIAS open source, Extended GPL, see docs/LICENSE */
4
14{
15 protected $plugin;
16 protected $pc_gui;
17 protected $pc;
18
24 function setPCGUI($a_val)
25 {
26 $this->pc_gui = $a_val;
27 }
28
34 function getPCGUI()
35 {
36 return $this->pc_gui;
37 }
38
44 function setPlugin($a_val)
45 {
46 $this->plugin = $a_val;
47 }
48
54 function getPlugin()
55 {
56 return $this->plugin;
57 }
58
64 final function setMode($a_mode)
65 {
66 $this->mode = $a_mode;
67 }
68
74 final function getMode()
75 {
76 return $this->mode;
77 }
78
85 function getHTML()
86 {
88 {
89 $this->insert();
90 }
91 else if ($this->getMode() == ilPageComponentPlugin::CMD_EDIT)
92 {
93 $this->edit();
94 }
95
96 }
97
98 abstract function executeCommand();
99 abstract function insert();
100 abstract function edit();
101 abstract function create();
102 abstract function getElementHTML($a_mode, array $a_properties, $plugin_version);
103
104 function createElement(array $a_properties)
105 {
106 return $this->getPCGUI()->createElement($a_properties);
107 }
108
109 function updateElement(array $a_properties)
110 {
111 return $this->getPCGUI()->updateElement($a_properties);
112 }
113
117 function returnToParent()
118 {
119 $this->getPCGUI()->returnToParent();
120 }
121
127 function setProperties(array $a_val)
128 {
129 $co = $this->getPCGUI()->getContentObject();
130 if (is_object($co))
131 {
132 $co->setProperties($a_val);
133 }
134 }
135
141 function getProperties()
142 {
143 $co = $this->getPCGUI()->getContentObject();
144 if (is_object($co))
145 {
146 return $co->getProperties($a_val);
147 }
148 return array();
149 }
150
157 final protected function addCreationButton($a_form)
158 {
159 global $lng;
160
161 $a_form->addCommandButton("create_plug", $lng->txt("save"));
162 }
163}
164?>
Abstract parent class for all page component plugin gui classes.
getElementHTML($a_mode, array $a_properties, $plugin_version)
addCreationButton($a_form)
Add creation button.
setProperties(array $a_val)
Set properties.
global $lng
Definition: privfeed.php:40