ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
ilPCTabsGUI Class Reference

Class ilPCTabsGUI. More...

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

Public Member Functions

 ilPCTabsGUI (&$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
 ilPageContentGUI ($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...
 

Additional Inherited Members

- Static Public Member Functions inherited from ilPageContentGUI
static _getCommonBBButtons ()
 Get common bb buttons. More...
 
- Data Fields inherited from ilPageContentGUI
 $content_obj
 
 $ilias
 
 $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...
 
- Protected Attributes inherited from ilPageContentGUI
 $log
 
- 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.

Member Function Documentation

◆ addTab()

ilPCTabsGUI::addTab ( )

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

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

492 {
493 global $lng, $ilCtrl;
494
495 $this->content_obj->addTab($lng->txt("cont_new_tab"));
496 $this->updated = $this->pg_obj->update();
497
498 ilUtil::sendSuccess($lng->txt("cont_added_tab"), true);
499 $ilCtrl->redirect($this, "edit");
500 }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
global $ilCtrl
Definition: ilias.php:18

References $ilCtrl, ilPageContentGUI\$lng, and ilUtil\sendSuccess().

+ Here is the call graph for this function:

◆ afterCreation()

ilPCTabsGUI::afterCreation ( )

After creation processing.

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

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

References $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 539 of file class.ilPCTabsGUI.php.

540 {
541 global $ilCtrl;
542 $ilCtrl->redirect($this, "edit");
543 }

References $ilCtrl.

◆ confirmTabsDeletion()

ilPCTabsGUI::confirmTabsDeletion ( )

Confirm tabs deletion.

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

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

References $_POST, $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 323 of file class.ilPCTabsGUI.php.

324 {
325 global $ilDB, $lng;
326
327 $this->initForm("create");
328 if ($this->form->checkInput())
329 {
330 $this->content_obj = new ilPCTabs($this->getPage());
331 $this->content_obj->create($this->pg_obj, $this->hier_id, $this->pc_id);
332
333 $this->setPropertiesByForm();
334
335 for ($i = 0; $i < (int) $_POST["nr"]; $i++)
336 {
337 $this->content_obj->addTab($lng->txt("cont_new_tab"));
338 }
339
340 $this->updated = $this->pg_obj->update();
341
342 if ($this->updated === true)
343 {
344 $this->afterCreation();
345 //$this->ctrl->returnToParent($this, "jump".$this->hier_id);
346 }
347 else
348 {
349 $this->insert();
350 }
351 }
352 else
353 {
354 $this->form->setValuesByPost();
355 $this->insert(true);
356// return $this->form->getHtml();
357 }
358 }
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, $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 548 of file class.ilPCTabsGUI.php.

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

References $_POST, and $ilCtrl.

◆ edit()

ilPCTabsGUI::edit ( )

List all tabs.

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

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

References $ilCtrl, ilPageContentGUI\$lng, 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 69 of file class.ilPCTabsGUI.php.

70 {
71 global $ilCtrl, $lng, $tpl;
72
74 $this->setTabs();
75
76 $this->initForm();
77 $this->getFormValues();
78 $html = $this->form->getHTML();
79 $tpl->setContent($html);
80 }
getFormValues()
Get form values.
displayValidationError()
display validation errors
$html
Definition: example_001.php:87

References $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 31 of file class.ilPCTabsGUI.php.

32 {
33 // get next class that processes or forwards current command
34 $next_class = $this->ctrl->getNextClass($this);
35
36 // get current command
37 $cmd = $this->ctrl->getCmd();
38
39 switch($next_class)
40 {
41 default:
42 $ret =& $this->$cmd();
43 break;
44 }
45
46 return $ret;
47 }
$cmd
Definition: sahs_server.php:35

References $cmd, and $ret.

◆ getFormValues()

ilPCTabsGUI::getFormValues ( )

Get form values.

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

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

References 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:

◆ ilPCTabsGUI()

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

Constructor @access public.

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

24 {
25 parent::ilPageContentGUI($a_pg_obj, $a_content_obj, $a_hier_id, $a_pc_id);
26 }

◆ initForm()

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

Insert tabs form.

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

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

References $html, $ilCtrl, ilPageContentGUI\$lng, $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 52 of file class.ilPCTabsGUI.php.

53 {
54 global $tpl;
55
57
58 if (!$a_omit_form_init)
59 {
60 $this->initForm("create");
61 }
62 $html = $this->form->getHTML();
63 $tpl->setContent($html);
64 }

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 469 of file class.ilPCTabsGUI.php.

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

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

+ Here is the call graph for this function:

◆ setPropertiesByForm()

ilPCTabsGUI::setPropertiesByForm ( )

Set properties by post.

Parameters

return

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

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

References $_POST, ilPageContentGUI\$content_obj, $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 569 of file class.ilPCTabsGUI.php.

570 {
571 global $ilTabs, $ilCtrl, $lng;
572
573 $ilTabs->setBackTarget($lng->txt("pg"),
574 $this->ctrl->getParentReturn($this));
575
576 $ilTabs->addTarget("cont_tabs",
577 $ilCtrl->getLinkTarget($this, "edit"), "edit",
578 get_class($this));
579
580 $ilTabs->addTarget("cont_edit_tabs",
581 $ilCtrl->getLinkTarget($this, "editProperties"), "editProperties",
582 get_class($this));
583
584 }

References $ilCtrl, and ilPageContentGUI\$lng.

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 422 of file class.ilPCTabsGUI.php.

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

References editProperties(), initForm(), ilUtil\sendSuccess(), and setPropertiesByForm().

+ Here is the call graph for this function:

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