ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilPCTabsGUI Class Reference

Class ilPCTabsGUI. More...

+ Inheritance diagram for ilPCTabsGUI:
+ Collaboration diagram for ilPCTabsGUI:

Public Member Functions

 __construct (&$a_pg_obj, &$a_content_obj, $a_hier_id, $a_pc_id="")
 Constructor @access public. More...
 
 executeCommand ()
 execute command More...
 
 insert ($a_omit_form_init=false)
 Insert new tabs. More...
 
 editProperties ()
 Edit tabs. More...
 
 initForm ($a_mode="edit")
 Insert tabs form. More...
 
 getFormValues ()
 Get form values. More...
 
 create ()
 Create new tabs in dom and update page in db. More...
 
 afterCreation ()
 After creation processing. More...
 
 setPropertiesByForm ()
 Set properties by post. More...
 
 update ()
 Save tabs properties in db and return to page edit screen. More...
 
 edit ()
 List all tabs. More...
 
 saveTabs ()
 Save tabs properties in db and return to page edit screen. More...
 
 addTab ()
 Save tabs properties in db and return to page edit screen. More...
 
 confirmTabsDeletion ()
 Confirm tabs deletion. More...
 
 cancelTabDeletion ()
 Cancel tab deletion. More...
 
 deleteTabs ()
 Delete Tabs. More...
 
 setTabs ()
 Set tabs. 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...
 
 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

 $db
 
 $tabs
 
 $toolbar
 
- 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 ilPCTabsGUI.

User Interface for Tabbed Content

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

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

Constructor & Destructor Documentation

◆ __construct()

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

Constructor @access public.

Definition at line 38 of file class.ilPCTabsGUI.php.

39 {
40 global $DIC;
41
42 $this->tpl = $DIC["tpl"];
43 $this->ctrl = $DIC->ctrl();
44 $this->lng = $DIC->language();
45 $this->db = $DIC->database();
46 $this->tabs = $DIC->tabs();
47 $this->toolbar = $DIC->toolbar();
48 parent::__construct($a_pg_obj, $a_content_obj, $a_hier_id, $a_pc_id);
49 }
global $DIC
Definition: saml.php:7

References $DIC.

Member Function Documentation

◆ addTab()

ilPCTabsGUI::addTab ( )

Save tabs properties in db and return to page edit screen.

Definition at line 493 of file class.ilPCTabsGUI.php.

494 {
497
498 $this->content_obj->addTab($lng->txt("cont_new_tab"));
499 $this->updated = $this->pg_obj->update();
500
501 ilUtil::sendSuccess($lng->txt("cont_added_tab"), true);
502 $ilCtrl->redirect($this, "edit");
503 }
global $ilCtrl
Definition: ilias.php:18

References ilPageContentGUI\$ctrl, $ilCtrl, and ilPageContentGUI\$lng.

◆ afterCreation()

ilPCTabsGUI::afterCreation ( )

After creation processing.

Definition at line 365 of file class.ilPCTabsGUI.php.

366 {
368
369 $this->pg_obj->stripHierIDs();
370 $this->pg_obj->addHierIDs();
371 $ilCtrl->setParameter($this, "hier_id", $this->content_obj->readHierId());
372 $ilCtrl->setParameter($this, "pc_id", $this->content_obj->readPCId());
373 $this->content_obj->setHierId($this->content_obj->readHierId());
374 $this->setHierId($this->content_obj->readHierId());
375 $this->content_obj->setPCId($this->content_obj->readPCId());
376 $this->edit();
377 }
edit()
List all tabs.
setHierId($a_hier_id)
get hierarchical id in dom object

References ilPageContentGUI\$ctrl, $ilCtrl, edit(), and ilPageContentGUI\setHierId().

Referenced by create().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ cancelTabDeletion()

ilPCTabsGUI::cancelTabDeletion ( )

Cancel tab deletion.

Definition at line 543 of file class.ilPCTabsGUI.php.

544 {
546 $ilCtrl->redirect($this, "edit");
547 }

References ilPageContentGUI\$ctrl, and $ilCtrl.

◆ confirmTabsDeletion()

ilPCTabsGUI::confirmTabsDeletion ( )

Confirm tabs deletion.

Definition at line 508 of file class.ilPCTabsGUI.php.

509 {
513
514 $this->setTabs();
515
516 if (!is_array($_POST["tid"]) || count($_POST["tid"]) == 0) {
517 ilUtil::sendInfo($lng->txt("no_checkbox"), true);
518 $ilCtrl->redirect($this, "edit");
519 } else {
520 include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
521 $cgui = new ilConfirmationGUI();
522 $cgui->setFormAction($ilCtrl->getFormAction($this));
523 $cgui->setHeaderText($lng->txt("cont_tabs_confirm_deletion"));
524 $cgui->setCancel($lng->txt("cancel"), "cancelTabDeletion");
525 $cgui->setConfirm($lng->txt("delete"), "deleteTabs");
526
527 foreach ($_POST["tid"] as $k => $i) {
528 $id = explode(":", $k);
529 $cgui->addItem(
530 "tid[]",
531 $k,
532 $this->content_obj->getCaption($id[0], $id[1])
533 );
534 }
535
536 $tpl->setContent($cgui->getHTML());
537 }
538 }
$_POST["username"]
Confirmation screen class.
setTabs()
Set tabs.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
$i
Definition: disco.tpl.php:19
if(!array_key_exists('StateId', $_REQUEST)) $id

References $_POST, ilPageContentGUI\$ctrl, $i, $id, $ilCtrl, ilPageContentGUI\$lng, ilPageContentGUI\$tpl, ilUtil\sendInfo(), and setTabs().

+ Here is the call graph for this function:

◆ create()

ilPCTabsGUI::create ( )

Create new tabs in dom and update page in db.

Definition at line 331 of file class.ilPCTabsGUI.php.

332 {
335
336 $this->initForm("create");
337 if ($this->form->checkInput()) {
338 $this->content_obj = new ilPCTabs($this->getPage());
339 $this->content_obj->create($this->pg_obj, $this->hier_id, $this->pc_id);
340
341 $this->setPropertiesByForm();
342
343 for ($i = 0; $i < (int) $_POST["nr"]; $i++) {
344 $this->content_obj->addTab($lng->txt("cont_new_tab"));
345 }
346
347 $this->updated = $this->pg_obj->update();
348
349 if ($this->updated === true) {
350 $this->afterCreation();
351 //$this->ctrl->returnToParent($this, "jump".$this->hier_id);
352 } else {
353 $this->insert();
354 }
355 } else {
356 $this->form->setValuesByPost();
357 $this->insert(true);
358 // return $this->form->getHtml();
359 }
360 }
afterCreation()
After creation processing.
insert($a_omit_form_init=false)
Insert new tabs.
initForm($a_mode="edit")
Insert tabs form.
setPropertiesByForm()
Set properties by post.
Class ilPCTabs.
global $ilDB

References $_POST, $db, $i, $ilDB, ilPageContentGUI\$lng, afterCreation(), ilPageContentGUI\getPage(), initForm(), insert(), and setPropertiesByForm().

+ Here is the call graph for this function:

◆ deleteTabs()

ilPCTabsGUI::deleteTabs ( )

Delete Tabs.

Definition at line 552 of file class.ilPCTabsGUI.php.

553 {
555
556 if (is_array($_POST["tid"])) {
557 foreach ($_POST["tid"] as $tid) {
558 $ids = explode(":", $tid);
559 $this->content_obj->deleteTab($ids[0], $ids[1]);
560 }
561 }
562 $this->updated = $this->pg_obj->update();
563
564 $ilCtrl->redirect($this, "edit");
565 }

References $_POST, ilPageContentGUI\$ctrl, and $ilCtrl.

◆ edit()

ilPCTabsGUI::edit ( )

List all tabs.

Definition at line 449 of file class.ilPCTabsGUI.php.

450 {
452 $ilTabs = $this->tabs;
454 $ilToolbar = $this->toolbar;
456
457 $ilToolbar->addButton(
458 $lng->txt("cont_add_tab"),
459 $ilCtrl->getLinkTarget($this, "addTab")
460 );
461
462 $this->setTabs();
463 $ilTabs->activateTab("cont_tabs");
464 include_once("./Services/COPage/classes/class.ilPCTabsTableGUI.php");
465 $table_gui = new ilPCTabsTableGUI($this, "edit", $this->content_obj);
466 $tpl->setContent($table_gui->getHTML());
467 }
TableGUI class for tabs.

References ilPageContentGUI\$ctrl, $ilCtrl, ilPageContentGUI\$lng, $tabs, $toolbar, ilPageContentGUI\$tpl, and setTabs().

Referenced by afterCreation().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ editProperties()

ilPCTabsGUI::editProperties ( )

Edit tabs.

Definition at line 90 of file class.ilPCTabsGUI.php.

91 {
95
97 $this->setTabs();
98
99 $this->initForm();
100 $this->getFormValues();
101 $html = $this->form->getHTML();
102 $tpl->setContent($html);
103 }
getFormValues()
Get form values.
displayValidationError()
display validation errors
$html
Definition: example_001.php:87

References ilPageContentGUI\$ctrl, $html, $ilCtrl, ilPageContentGUI\$lng, ilPageContentGUI\$tpl, ilPageContentGUI\displayValidationError(), getFormValues(), initForm(), and setTabs().

Referenced by update().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ executeCommand()

ilPCTabsGUI::executeCommand ( )

execute command

Definition at line 54 of file class.ilPCTabsGUI.php.

55 {
56 // get next class that processes or forwards current command
57 $next_class = $this->ctrl->getNextClass($this);
58
59 // get current command
60 $cmd = $this->ctrl->getCmd();
61
62 switch ($next_class) {
63 default:
64 $ret = $this->$cmd();
65 break;
66 }
67
68 return $ret;
69 }
$ret
Definition: parser.php:6

References $ret.

◆ getFormValues()

ilPCTabsGUI::getFormValues ( )

Get form values.

Definition at line 290 of file class.ilPCTabsGUI.php.

291 {
292 $values["type"] = $this->content_obj->getTabType();
293 $values["content_width"] = $this->content_obj->getContentWidth();
294 $values["content_height"] = $this->content_obj->getContentHeight();
295 $values["valign"] = $this->content_obj->getHorizontalAlign();
296 $values["calign"] = $this->content_obj->getHorizontalAlign();
297 $values["vbehavior"] = $this->content_obj->getBehavior();
298 $values["hbehavior"] = $this->content_obj->getBehavior();
299
300 $values["auto_time"] = $this->content_obj->getAutoTime();
301 $values["rand_start"] = $this->content_obj->getRandomStart();
302
303 $this->form->setValuesByArray($values);
304
305 if ($values["type"] == ilPCTabs::ACCORDION_VER) {
306 $va = $this->form->getItemByPostVar("vaccord_templ");
307 $v = "t:" .
308 ilObjStyleSheet::_lookupTemplateIdByName($this->getStyleId(), $this->content_obj->getTemplate()) . ":" .
309 $this->content_obj->getTemplate();
310 $va->setValue($v);
311 }
312 if ($values["type"] == ilPCTabs::ACCORDION_HOR) {
313 $ha = $this->form->getItemByPostVar("haccord_templ");
314 $v = "t:" .
315 ilObjStyleSheet::_lookupTemplateIdByName($this->getStyleId(), $this->content_obj->getTemplate()) . ":" .
316 $this->content_obj->getTemplate();
317 $ha->setValue($v);
318 }
319 if ($values["type"] == ilPCTabs::CAROUSEL) {
320 $ca = $this->form->getItemByPostVar("carousel_templ");
321 $v = "t:" .
322 ilObjStyleSheet::_lookupTemplateIdByName($this->getStyleId(), $this->content_obj->getTemplate()) . ":" .
323 $this->content_obj->getTemplate();
324 $ca->setValue($v);
325 }
326 }
static _lookupTemplateIdByName($a_style_id, $a_name)
Lookup table template preview.
const CAROUSEL
const ACCORDION_HOR
const ACCORDION_VER
$values

References $values, ilObjStyleSheet\_lookupTemplateIdByName(), ilPCTabs\ACCORDION_HOR, ilPCTabs\ACCORDION_VER, ilPCTabs\CAROUSEL, and ilPageContentGUI\getStyleId().

Referenced by editProperties().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initForm()

ilPCTabsGUI::initForm (   $a_mode = "edit")

Insert tabs form.

Definition at line 108 of file class.ilPCTabsGUI.php.

109 {
113
114 include_once("./Services/Accordion/classes/class.ilAccordionGUI.php");
116
117 // edit form
118 include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
119 $this->form = new ilPropertyFormGUI();
120 $this->form->setFormAction($ilCtrl->getFormAction($this));
121 if ($a_mode != "edit") {
122 $this->form->setTitle($lng->txt("cont_ed_insert_tabs"));
123 } else {
124 $this->form->setTitle($lng->txt("cont_edit_tabs"));
125 }
126
127
128 // type selection
129 $radg = new ilRadioGroupInputGUI($lng->txt("cont_type"), "type");
130 $radg->setValue(ilPCTabs::ACCORDION_VER);
131
132 // type: vertical accordion
133 $op1 = new ilRadioOption($lng->txt("cont_tabs_acc_ver"), ilPCTabs::ACCORDION_VER);
134
135 $templ = $this->getTemplateOptions("vaccordion");
136 require_once("./Services/Form/classes/class.ilAdvSelectInputGUI.php");
137 if (count($templ) > 0) {
138 $vchar_prop = new ilAdvSelectInputGUI(
139 $this->lng->txt("cont_characteristic"),
140 "vaccord_templ"
141 );
142 foreach ($templ as $k => $te) {
143 $t = explode(":", $k);
144 $html = $this->style->lookupTemplatePreview($t[1]) . '<div style="clear:both" class="small">' . $te . "</div>";
145 $vchar_prop->addOption($k, $te, $html);
146 if ($t[2] == "VerticalAccordion") {
147 $vchar_prop->setValue($k);
148 }
149 }
150 $op1->addSubItem($vchar_prop);
151 } else {
152 $vchar_prop = new ilHiddenInputGUI("vaccord_templ");
153 $this->form->addItem($vchar_prop);
154 }
155 $radg->addOption($op1);
156
157
158
159 // type: horizontal accordion
160 $op2 = new ilRadioOption($lng->txt("cont_tabs_acc_hor"), ilPCTabs::ACCORDION_HOR);
161
162 $templ = $this->getTemplateOptions("haccordion");
163 if (count($templ) > 0) {
164 $hchar_prop = new ilAdvSelectInputGUI(
165 $this->lng->txt("cont_characteristic"),
166 "haccord_templ"
167 );
168 foreach ($templ as $k => $te) {
169 $t = explode(":", $k);
170 $html = $this->style->lookupTemplatePreview($t[1]) . '<div style="clear:both" class="small">' . $te . "</div>";
171 $hchar_prop->addOption($k, $te, $html);
172 if ($t[2] == "HorizontalAccordion") {
173 $hchar_prop->setValue($k);
174 }
175 }
176 $op2->addSubItem($hchar_prop);
177 } else {
178 $hchar_prop = new ilHiddenInputGUI("haccord_templ");
179 $this->form->addItem($hchar_prop);
180 }
181
182 $radg->addOption($op2);
183
184 // type: carousel
185 $op3 = new ilRadioOption($lng->txt("cont_tabs_carousel"), ilPCTabs::CAROUSEL);
186 $templ = $this->getTemplateOptions("carousel");
187 require_once("./Services/Form/classes/class.ilAdvSelectInputGUI.php");
188 if (count($templ) > 0) {
189 $cchar_prop = new ilAdvSelectInputGUI(
190 $this->lng->txt("cont_characteristic"),
191 "carousel_templ"
192 );
193 foreach ($templ as $k => $te) {
194 $t = explode(":", $k);
195 $html = $this->style->lookupTemplatePreview($t[1]) . '<div style="clear:both" class="small">' . $te . "</div>";
196 $cchar_prop->addOption($k, $te, $html);
197 if ($t[2] == "Carousel") {
198 $cchar_prop->setValue($k);
199 }
200 }
201 $op3->addSubItem($cchar_prop);
202 } else {
203 $cchar_prop = new ilHiddenInputGUI("carousel_templ");
204 $this->form->addItem($cchar_prop);
205 }
206
207 $radg->addOption($op3);
208 $this->form->addItem($radg);
209
210
211 // number of initial tabs
212 if ($a_mode == "create") {
213 $nr_prop = new ilSelectInputGUI(
214 $lng->txt("cont_number_of_tabs"),
215 "nr"
216 );
217 $nrs = array(1 => 1, 2 => 2, 3 => 3, 4 => 4, 5 => 5, 6 => 6,
218 7 => 7, 8 => 8, 9 => 9, 10 => 10);
219 $nr_prop->setOptions($nrs);
220 $this->form->addItem($nr_prop);
221 }
222
223 $ni = new ilNumberInputGUI($this->lng->txt("cont_tab_cont_width"), "content_width");
224 $ni->setMaxLength(4);
225 $ni->setSize(4);
226 $this->form->addItem($ni);
227
228 $ni = new ilNumberInputGUI($this->lng->txt("cont_tab_cont_height"), "content_height");
229 $ni->setMaxLength(4);
230 $ni->setSize(4);
231 $this->form->addItem($ni);
232
233 // behaviour
234 $options = array(
235 "AllClosed" => $lng->txt("cont_all_closed"),
236 "FirstOpen" => $lng->txt("cont_first_open"),
237 "ForceAllOpen" => $lng->txt("cont_force_all_open"),
238 );
239 $si = new ilSelectInputGUI($this->lng->txt("cont_behavior"), "vbehavior");
240 $si->setOptions($options);
241 $op1->addSubItem($si);
242 $si = new ilSelectInputGUI($this->lng->txt("cont_behavior"), "hbehavior");
243 $si->setOptions($options);
244 $op2->addSubItem($si);
245
246
247 // alignment
248 $align_opts = array("Left" => $lng->txt("cont_left"),
249 "Right" => $lng->txt("cont_right"), "Center" => $lng->txt("cont_center"),
250 "LeftFloat" => $lng->txt("cont_left_float"),
251 "RightFloat" => $lng->txt("cont_right_float"));
252 $align = new ilSelectInputGUI($this->lng->txt("cont_align"), "valign");
253 $align->setOptions($align_opts);
254 $align->setValue("Center");
255 //$align->setInfo($lng->txt("cont_tabs_hor_align_info"));
256 $op1->addSubItem($align);
257 $align = new ilSelectInputGUI($this->lng->txt("cont_align"), "calign");
258 $align->setOptions($align_opts);
259 $align->setValue("Center");
260 $op3->addSubItem($align);
261
262 // carousel: time
263 $ti = new ilNumberInputGUI($this->lng->txt("cont_auto_time"), "auto_time");
264 $ti->setMaxLength(6);
265 $ti->setSize(6);
266 $ti->setSuffix("ms");
267 $ti->setMinValue(100);
268 $op3->addSubItem($ti);
269
270 // carousel: random start
271 $cb = new ilCheckboxInputGUI($this->lng->txt("cont_rand_start"), "rand_start");
272 //$cb->setOptionTitle($this->lng->txt(""));
273 //$cb->setInfo($this->lng->txt(""));
274 $op3->addSubItem($cb);
275
276
277 // save/cancel buttons
278 if ($a_mode == "create") {
279 $this->form->addCommandButton("create_section", $lng->txt("save"));
280 $this->form->addCommandButton("cancelCreate", $lng->txt("cancel"));
281 } else {
282 $this->form->addCommandButton("update", $lng->txt("save"));
283 $this->form->addCommandButton("cancelUpdate", $lng->txt("cancel"));
284 }
285 }
static addCss()
Add required css.
This class represents an advanced selection list property in a property form.
This class represents a checkbox property in a property form.
This class represents a hidden form property in a property form.
This class represents a number property in a property form.
getTemplateOptions($a_type)
Get table templates.
This class represents a property form user interface.
This class represents a property in a property form.
This class represents an option in a radio group.
This class represents a selection list property in a property form.

References ilPageContentGUI\$ctrl, $html, $ilCtrl, ilPageContentGUI\$lng, PHPMailer\PHPMailer\$options, $si, $t, ilPageContentGUI\$tpl, ilPCTabs\ACCORDION_HOR, ilPCTabs\ACCORDION_VER, ilAccordionGUI\addCss(), ilPCTabs\CAROUSEL, and ilPageContentGUI\getTemplateOptions().

Referenced by create(), editProperties(), insert(), and update().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ insert()

ilPCTabsGUI::insert (   $a_omit_form_init = false)

Insert new tabs.

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

75 {
77
79
80 if (!$a_omit_form_init) {
81 $this->initForm("create");
82 }
83 $html = $this->form->getHTML();
84 $tpl->setContent($html);
85 }

References $html, ilPageContentGUI\$tpl, ilPageContentGUI\displayValidationError(), and initForm().

Referenced by create().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ saveTabs()

ilPCTabsGUI::saveTabs ( )

Save tabs properties in db and return to page edit screen.

Definition at line 472 of file class.ilPCTabsGUI.php.

473 {
476
477 if (is_array($_POST["caption"])) {
478 $captions = ilUtil::stripSlashesArray($_POST["caption"]);
479 $this->content_obj->saveCaptions($captions);
480 }
481 if (is_array($_POST["position"])) {
482 $positions = ilUtil::stripSlashesArray($_POST["position"]);
483 $this->content_obj->savePositions($positions);
484 }
485 $this->updated = $this->pg_obj->update();
486 ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
487 $ilCtrl->redirect($this, "edit");
488 }
static stripSlashesArray($a_arr, $a_strip_html=true, $a_allow="")
Strip slashes from array.

References $_POST, ilPageContentGUI\$ctrl, $ilCtrl, ilPageContentGUI\$lng, and ilUtil\stripSlashesArray().

+ Here is the call graph for this function:

◆ setPropertiesByForm()

ilPCTabsGUI::setPropertiesByForm ( )

Set properties by post.

Parameters

return

Definition at line 385 of file class.ilPCTabsGUI.php.

386 {
388 $f = $this->form;
389
390 $c->setTabType($f->getInput("type"));
391
392 $c->setContentWidth($f->getInput("content_width"));
393 $c->setContentHeight($f->getInput("content_height"));
394 $c->setTemplate("");
395 switch ($_POST["type"]) {
397 $t = explode(":", $f->getInput("vaccord_templ"));
398 $c->setTemplate($t[2]);
399 $c->setBehavior($f->getInput("vbehavior"));
400 $c->setHorizontalAlign($f->getInput("valign"));
401 break;
402
404 $t = explode(":", $f->getInput("haccord_templ"));
405 $c->setTemplate($t[2]);
406 $c->setBehavior($f->getInput("hbehavior"));
407 break;
408
410 $t = explode(":", $f->getInput("carousel_templ"));
411 $c->setTemplate($t[2]);
412 $c->setHorizontalAlign($f->getInput("calign"));
413 $c->setAutoTime($f->getInput("auto_time"));
414 $c->setRandomStart($f->getInput("rand_start"));
415 break;
416 }
417 }
if(isset($_POST['submit'])) $form

References $_POST, $c, ilPageContentGUI\$content_obj, $f, $form, $t, ilPCTabs\ACCORDION_HOR, ilPCTabs\ACCORDION_VER, and ilPCTabs\CAROUSEL.

Referenced by create(), and update().

+ Here is the caller graph for this function:

◆ setTabs()

ilPCTabsGUI::setTabs ( )

Set tabs.

Definition at line 571 of file class.ilPCTabsGUI.php.

572 {
573 $ilTabs = $this->tabs;
576
577 $ilTabs->setBackTarget(
578 $lng->txt("pg"),
579 $this->ctrl->getParentReturn($this)
580 );
581
582 $ilTabs->addTarget(
583 "cont_tabs",
584 $ilCtrl->getLinkTarget($this, "edit"),
585 "edit",
586 get_class($this)
587 );
588
589 $ilTabs->addTarget(
590 "cont_edit_tabs",
591 $ilCtrl->getLinkTarget($this, "editProperties"),
592 "editProperties",
593 get_class($this)
594 );
595 }

References ilPageContentGUI\$ctrl, $ilCtrl, ilPageContentGUI\$lng, and $tabs.

Referenced by confirmTabsDeletion(), edit(), and editProperties().

+ Here is the caller graph for this function:

◆ update()

ilPCTabsGUI::update ( )

Save tabs properties in db and return to page edit screen.

Definition at line 423 of file class.ilPCTabsGUI.php.

424 {
425 $this->initForm();
426 $this->updated = false;
427 if ($this->form->checkInput()) {
428 $this->setPropertiesByForm();
429 $this->updated = $this->pg_obj->update();
430 }
431 if ($this->updated === true) {
432 ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
433 $this->ctrl->redirect($this, "editProperties");
434 //$this->ctrl->returnToParent($this, "jump".$this->hier_id);
435 } else {
436 $this->pg_obj->addHierIDs();
437 $this->editProperties();
438 }
439 }
editProperties()
Edit tabs.

References editProperties(), initForm(), and setPropertiesByForm().

+ Here is the call graph for this function:

Field Documentation

◆ $db

ilPCTabsGUI::$db
protected

Definition at line 22 of file class.ilPCTabsGUI.php.

Referenced by create().

◆ $tabs

ilPCTabsGUI::$tabs
protected

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

Referenced by edit(), and setTabs().

◆ $toolbar

ilPCTabsGUI::$toolbar
protected

Definition at line 32 of file class.ilPCTabsGUI.php.

Referenced by edit().


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