ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
class.ilPCTabsGUI.php
Go to the documentation of this file.
1 <?php
2 
24 {
25  protected \ILIAS\COPage\PC\PCDefinition $pc_def;
26  protected \ILIAS\COPage\Xsl\XslManager $xsl;
28  protected ilDBInterface $db;
29  protected ilTabsGUI $tabs;
31 
32  public function __construct(
33  ilPageObject $a_pg_obj,
34  ?ilPageContent $a_content_obj,
35  string $a_hier_id,
36  string $a_pc_id = ""
37  ) {
38  global $DIC;
39 
40  $this->tpl = $DIC["tpl"];
41  $this->ctrl = $DIC->ctrl();
42  $this->lng = $DIC->language();
43  $this->db = $DIC->database();
44  $this->tabs = $DIC->tabs();
45  $this->toolbar = $DIC->toolbar();
46  parent::__construct($a_pg_obj, $a_content_obj, $a_hier_id, $a_pc_id);
47  $this->xsl = $DIC->copage()->internal()->domain()->xsl();
48  $this->pc_def = $DIC->copage()->internal()->domain()->pc()->definition();
49  }
50 
51  public function executeCommand(): void
52  {
53  // get next class that processes or forwards current command
54  $next_class = $this->ctrl->getNextClass($this);
55 
56  // get current command
57  $cmd = $this->ctrl->getCmd();
58 
59  switch ($next_class) {
60  default:
61  $this->$cmd();
62  break;
63  }
64  }
65 
69  public function insert(
70  bool $a_omit_form_init = false
71  ): void {
72  $tpl = $this->tpl;
73 
74  $this->displayValidationError();
75 
76  if (!$a_omit_form_init) {
77  $this->initForm("create");
78  }
79  $html = $this->form->getHTML();
80  $tpl->setContent($html);
81  }
82 
83  public function editProperties(bool $init_form = true): void
84  {
85  $tpl = $this->tpl;
86 
87  $this->displayValidationError();
88  $this->setTabs();
89 
90  if ($init_form) {
91  $this->initForm();
92  $this->getFormValues();
93  }
94  $html = $this->form->getHTML();
95  $tpl->setContent($html);
96  }
97 
98  public function initForm(
99  string $a_mode = "edit"
100  ): void {
101  $ilCtrl = $this->ctrl;
102  $lng = $this->lng;
103 
105 
106  // edit form
107  $this->form = new ilPropertyFormGUI();
108  $this->form->setShowTopButtons(false);
109  $this->form->setFormAction($ilCtrl->getFormAction($this));
110  if ($a_mode != "edit") {
111  $this->form->setTitle($lng->txt("cont_ed_insert_tabs"));
112  } else {
113  $this->form->setTitle($lng->txt("cont_edit_tabs"));
114  }
115 
116 
117  // type selection
118  $radg = new ilRadioGroupInputGUI($lng->txt("cont_type"), "type");
120 
121  // type: vertical accordion
122  $op1 = new ilRadioOption($lng->txt("cont_tabs_acc_ver"), ilPCTabs::ACCORDION_VER);
123  $templ = $this->getTemplateOptions("vaccordion");
124  if (count($templ) > 0) {
125 
126  $options = [];
127  foreach ($templ as $k => $te) {
128  $options[$k] = $te;
129  }
130  $vchar_prop = new ilSelectInputGUI($this->lng->txt("cont_characteristic"), "vaccord_templ");
131  $vchar_prop->setOptions($options);
132  $op1->addSubItem($vchar_prop);
133 
134 
135  } else {
136  $vchar_prop = new ilHiddenInputGUI("vaccord_templ");
137  $this->form->addItem($vchar_prop);
138  }
139  $radg->addOption($op1);
140 
141 
142 
143  // type: horizontal accordion
144  /*
145  $op2 = new ilRadioOption($lng->txt("cont_tabs_acc_hor"), ilPCTabs::ACCORDION_HOR);
146 
147  $templ = $this->getTemplateOptions("haccordion");
148  if (count($templ) > 0) {
149  $hchar_prop = new ilAdvSelectInputGUI(
150  $this->lng->txt("cont_characteristic"),
151  "haccord_templ"
152  );
153  foreach ($templ as $k => $te) {
154  $t = explode(":", $k);
155  $html = $this->style->lookupTemplatePreview($t[1]) . '<div style="clear:both" class="small">' . $te . "</div>";
156  $hchar_prop->addOption($k, $te, $html);
157  if ($t[2] == "HorizontalAccordion") {
158  $hchar_prop->setValue($k);
159  }
160  }
161  $op2->addSubItem($hchar_prop);
162  } else {
163  $hchar_prop = new ilHiddenInputGUI("haccord_templ");
164  $this->form->addItem($hchar_prop);
165  }
166 
167  $radg->addOption($op2);*/
168 
169  // type: carousel
170  $op3 = new ilRadioOption($lng->txt("cont_tabs_carousel"), ilPCTabs::CAROUSEL);
171  $templ = $this->getTemplateOptions("carousel");
172  if (count($templ) > 0) {
173  $cchar_prop = new ilAdvSelectInputGUI(
174  $this->lng->txt("cont_characteristic"),
175  "carousel_templ"
176  );
177  foreach ($templ as $k => $te) {
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  $cchar_prop->setValue($k);
183  }
184  }
185  $op3->addSubItem($cchar_prop);
186  } else {
187  $cchar_prop = new ilHiddenInputGUI("carousel_templ");
188  $this->form->addItem($cchar_prop);
189  }
190 
191  $radg->addOption($op3);
192  $this->form->addItem($radg);
193 
194 
195  // number of initial tabs
196  if ($a_mode == "create") {
197  $nr_prop = new ilSelectInputGUI(
198  $lng->txt("cont_number_of_tabs"),
199  "nr"
200  );
201  $nrs = array(1 => 1, 2 => 2, 3 => 3, 4 => 4, 5 => 5, 6 => 6,
202  7 => 7, 8 => 8, 9 => 9, 10 => 10);
203  $nr_prop->setOptions($nrs);
204  $this->form->addItem($nr_prop);
205  }
206 
207  /*
208  $ni = new ilNumberInputGUI($this->lng->txt("cont_tab_cont_width"), "content_width");
209  $ni->setMaxLength(4);
210  $ni->setSize(4);
211  $this->form->addItem($ni);
212 
213  $ni = new ilNumberInputGUI($this->lng->txt("cont_tab_cont_height"), "content_height");
214  $ni->setMaxLength(4);
215  $ni->setSize(4);
216  $this->form->addItem($ni);*/
217 
218  // behaviour
219  $options = array(
220  "AllClosed" => $lng->txt("cont_all_closed"),
221  "FirstOpen" => $lng->txt("cont_first_open"),
222  "ForceAllOpen" => $lng->txt("cont_force_all_open"),
223  );
224  $si = new ilSelectInputGUI($this->lng->txt("cont_behavior"), "vbehavior");
225  $si->setOptions($options);
226  $op1->addSubItem($si);
227  /*
228  $si = new ilSelectInputGUI($this->lng->txt("cont_behavior"), "hbehavior");
229  $si->setOptions($options);
230  $op2->addSubItem($si);*/
231 
232 
233  // alignment
234  /*
235  $align_opts = array("Left" => $lng->txt("cont_left"),
236  "Right" => $lng->txt("cont_right"), "Center" => $lng->txt("cont_center"),
237  "LeftFloat" => $lng->txt("cont_left_float"),
238  "RightFloat" => $lng->txt("cont_right_float"));
239  $align = new ilSelectInputGUI($this->lng->txt("cont_align"), "valign");
240  $align->setOptions($align_opts);
241  $align->setValue("Center");
242  //$align->setInfo($lng->txt("cont_tabs_hor_align_info"));
243  $op1->addSubItem($align);
244  $align = new ilSelectInputGUI($this->lng->txt("cont_align"), "calign");
245  $align->setOptions($align_opts);
246  $align->setValue("Center");
247  $op3->addSubItem($align);*/
248 
249  // carousel: time
250  $ti = new ilNumberInputGUI($this->lng->txt("cont_auto_time"), "auto_time");
251  $ti->setMaxLength(6);
252  $ti->setSize(6);
253  $ti->setSuffix("ms");
254  $ti->setMinValue(100);
255  $op3->addSubItem($ti);
256 
257  // carousel: random start
258  $cb = new ilCheckboxInputGUI($this->lng->txt("cont_rand_start"), "rand_start");
259  //$cb->setOptionTitle($this->lng->txt(""));
260  //$cb->setInfo($this->lng->txt(""));
261  $op3->addSubItem($cb);
262 
263 
264  // save/cancel buttons
265  if ($a_mode == "create") {
266  $this->form->addCommandButton("create_section", $lng->txt("save"));
267  $this->form->addCommandButton("cancelCreate", $lng->txt("cancel"));
268  } else {
269  $this->form->addCommandButton("update", $lng->txt("save"));
270  $this->form->addCommandButton("cancelUpdate", $lng->txt("cancel"));
271  }
272  }
273 
275  {
276  $this->initForm("create");
277  return $this->form;
278  }
279 
281  {
282  $this->initForm("edit");
283  $this->getFormValues();
284  return $this->form;
285  }
286 
287  public function getFormValues(): void
288  {
289  $values["type"] = $this->content_obj->getTabType();
290  $values["content_width"] = $this->content_obj->getContentWidth();
291  $values["content_height"] = $this->content_obj->getContentHeight();
292  $values["valign"] = $this->content_obj->getHorizontalAlign();
293  $values["calign"] = $this->content_obj->getHorizontalAlign();
294  $values["vbehavior"] = $this->content_obj->getBehavior();
295  $values["hbehavior"] = $this->content_obj->getBehavior();
296 
297  $values["auto_time"] = $this->content_obj->getAutoTime();
298  $values["rand_start"] = $this->content_obj->getRandomStart();
299 
300  $this->form->setValuesByArray($values);
301 
302  if ($values["type"] == ilPCTabs::ACCORDION_VER) {
303  $va = $this->form->getItemByPostVar("vaccord_templ");
304  $v = "t:" .
305  ilObjStyleSheet::_lookupTemplateIdByName($this->getStyleId(), $this->content_obj->getTemplate()) . ":" .
306  $this->content_obj->getTemplate();
307  $va->setValue($v);
308  }
309  /*
310  if ($values["type"] == ilPCTabs::ACCORDION_HOR) {
311  $ha = $this->form->getItemByPostVar("haccord_templ");
312  $v = "t:" .
313  ilObjStyleSheet::_lookupTemplateIdByName($this->getStyleId(), $this->content_obj->getTemplate()) . ":" .
314  $this->content_obj->getTemplate();
315  $ha->setValue($v);
316  }*/
317  if ($values["type"] == ilPCTabs::CAROUSEL) {
318  $ca = $this->form->getItemByPostVar("carousel_templ");
319  $v = "t:" .
320  ilObjStyleSheet::_lookupTemplateIdByName($this->getStyleId(), $this->content_obj->getTemplate()) . ":" .
321  $this->content_obj->getTemplate();
322  $ca->setValue($v);
323  }
324  }
325 
326  protected function checkWidthHeight(ilPropertyFormGUI $form): bool
327  {
328  $ok = true;
329  if ($form->getInput("type") === ilPCTabs::ACCORDION_HOR) {
330  if ($form->getInput("content_width") == "") {
331  $form->getItemByPostVar("content_width")
332  ->setAlert($this->lng->txt("cont_hacc_needs_width"));
333  $ok = false;
334  }
335  if ($form->getInput("content_height") == "") {
336  $form->getItemByPostVar("content_height")
337  ->setAlert($this->lng->txt("cont_hacc_needs_height"));
338  $ok = false;
339  }
340  }
341  return $ok;
342  }
343 
344  public function create(): void
345  {
346  $lng = $this->lng;
347 
348  $this->initForm("create");
349  if ($this->form->checkInput() && $this->checkWidthHeight($this->form)) {
350  $this->content_obj = new ilPCTabs($this->getPage());
351  $this->content_obj->create($this->pg_obj, $this->hier_id, $this->pc_id);
352 
353  $this->setPropertiesByForm();
354 
355  for ($i = 0; $i < $this->request->getInt("nr"); $i++) {
356  $this->content_obj->addTab($lng->txt("cont_new_tab"));
357  }
358 
359  $this->updated = $this->pg_obj->update();
360 
361  if ($this->updated === true) {
362  $this->afterCreation();
363  } else {
364  $this->insert();
365  }
366  } else {
367  $this->form->setValuesByPost();
368  $this->insert(true);
369  }
370  }
371 
372  public function afterCreation(): void
373  {
374  $ilCtrl = $this->ctrl;
375 
376  $this->pg_obj->stripHierIDs();
377  $this->pg_obj->addHierIDs();
378  $ilCtrl->setParameter($this, "hier_id", $this->content_obj->readHierId());
379  $ilCtrl->setParameter($this, "pc_id", $this->content_obj->readPCId());
380  $this->content_obj->setHierId($this->content_obj->readHierId());
381  $this->setHierId($this->content_obj->readHierId());
382  $this->content_obj->setPcId($this->content_obj->readPCId());
383  $this->edit();
384  }
385 
386  public function setPropertiesByForm(): void
387  {
389  $f = $this->form;
390 
391  $c->setTabType($f->getInput("type"));
392 
393  $c->setContentWidth((string) $f->getInput("content_width"));
394  $c->setContentHeight((string) $f->getInput("content_height"));
395  $c->setTemplate("");
396  switch ($this->request->getString("type")) {
398  $t = explode(":", $f->getInput("vaccord_templ"));
399  $c->setTemplate($t[2] ?? "");
400  $c->setBehavior($f->getInput("vbehavior"));
401  $c->setHorizontalAlign($f->getInput("valign"));
402  break;
403 
405  $t = explode(":", $f->getInput("haccord_templ"));
406  $c->setTemplate($t[2] ?? "");
407  $c->setBehavior($f->getInput("hbehavior"));
408  break;
409 
410  case ilPCTabs::CAROUSEL:
411  $t = explode(":", $f->getInput("carousel_templ"));
412  $c->setTemplate($t[2] ?? "");
413  $c->setHorizontalAlign($f->getInput("calign"));
414  $c->setAutoTime($f->getInput("auto_time"));
415  $c->setRandomStart($f->getInput("rand_start"));
416  break;
417  }
418  }
419 
420  public function update(): void
421  {
422  $this->initForm();
423  $this->updated = false;
424  if ($this->form->checkInput() && $this->checkWidthHeight($this->form)) {
425  $this->setPropertiesByForm();
426  $this->updated = $this->pg_obj->update();
427  } else {
428  $this->form->setValuesByPost();
429  $this->editProperties(false);
430  return;
431  }
432  if ($this->updated === true) {
433  $this->tpl->setOnScreenMessage('success', $this->lng->txt("msg_obj_modified"), true);
434  $this->ctrl->redirect($this, "editProperties");
435  } else {
436  $this->pg_obj->addHierIDs();
437  $this->editProperties(false);
438  }
439  }
440 
441  public function edit(): void
442  {
443  $tpl = $this->tpl;
444  $ilTabs = $this->tabs;
445  $ilCtrl = $this->ctrl;
446  $ilToolbar = $this->toolbar;
447  $lng = $this->lng;
448 
449  $this->initEditor();
450  $this->tabs->setBackTarget("", "");
451 
452  $tpl->setContent($this->getTabPanels() . $this->getEditorScriptTag($this->pc_id, "Tabs"));
453  }
454 
458  public function saveTabs(): void
459  {
460  $ilCtrl = $this->ctrl;
461  $lng = $this->lng;
462 
463  $captions = $this->request->getStringArray("caption");
464  $positions = $this->request->getStringArray("position");
465  if (count($captions) > 0) {
466  $this->content_obj->saveCaptions($captions);
467  }
468  if (count($positions)) {
469  $this->content_obj->savePositions($positions);
470  }
471  $this->updated = $this->pg_obj->update();
472  $this->tpl->setOnScreenMessage('success', $lng->txt("msg_obj_modified"), true);
473  $ilCtrl->redirect($this, "edit");
474  }
475 
479  public function addTab(): void
480  {
481  $lng = $this->lng;
482  $ilCtrl = $this->ctrl;
483 
484  $this->content_obj->addTab($lng->txt("cont_new_tab"));
485  $this->updated = $this->pg_obj->update();
486 
487  $this->tpl->setOnScreenMessage('success', $lng->txt("cont_added_tab"), true);
488  $ilCtrl->redirect($this, "edit");
489  }
490 
491  public function confirmTabsDeletion(): void
492  {
493  $ilCtrl = $this->ctrl;
494  $tpl = $this->tpl;
495  $lng = $this->lng;
496 
497  $this->setTabs();
498 
499  $tids = $this->request->getStringArray("tid");
500  if (count($tids) == 0) {
501  $this->tpl->setOnScreenMessage('info', $lng->txt("no_checkbox"), true);
502  $ilCtrl->redirect($this, "edit");
503  } else {
504  $cgui = new ilConfirmationGUI();
505  $cgui->setFormAction($ilCtrl->getFormAction($this));
506  $cgui->setHeaderText($lng->txt("cont_tabs_confirm_deletion"));
507  $cgui->setCancel($lng->txt("cancel"), "cancelTabDeletion");
508  $cgui->setConfirm($lng->txt("delete"), "deleteTabs");
509 
510  foreach ($tids as $k => $i) {
511  $id = explode(":", $k);
512  $cgui->addItem(
513  "tid[]",
514  $k,
515  $this->content_obj->getCaption($id[0], $id[1])
516  );
517  }
518 
519  $tpl->setContent($cgui->getHTML());
520  }
521  }
522 
523  public function cancelTabDeletion(): void
524  {
525  $ilCtrl = $this->ctrl;
526  $ilCtrl->redirect($this, "edit");
527  }
528 
529  public function deleteTabs(): void
530  {
531  $ilCtrl = $this->ctrl;
532 
533  $tids = $this->request->getStringArray("tid");
534  foreach ($tids as $tid) {
535  $ids = explode(":", $tid);
536  $this->content_obj->deleteTab($ids[0], $ids[1]);
537  }
538  $this->updated = $this->pg_obj->update();
539 
540  $ilCtrl->redirect($this, "edit");
541  }
542 
543  public function setTabs(): void
544  {
545  $ilTabs = $this->tabs;
546  $ilCtrl = $this->ctrl;
547  $lng = $this->lng;
548 
549  $ilTabs->setBackTarget(
550  $lng->txt("pg"),
551  $this->ctrl->getParentReturn($this)
552  );
553 
554  $ilTabs->addTarget(
555  "cont_tabs",
556  $ilCtrl->getLinkTarget($this, "edit"),
557  "edit",
558  get_class($this)
559  );
560 
561  $ilTabs->addTarget(
562  "cont_edit_tabs",
563  $ilCtrl->getLinkTarget($this, "editProperties"),
564  "editProperties",
565  get_class($this)
566  );
567  }
568 
569  protected function getCaptionForm(string $caption = ""): \ILIAS\Repository\Form\FormAdapterGUI
570  {
571  return $this->gui->form([self::class], "saveCaption")
572  ->text("caption", $this->lng->txt("title"), "", $caption);
573  }
574 
575  protected function getTabPanels(): string
576  {
578  $tabs = $this->content_obj;
579  $items = [];
580  $ui = $this->gui->ui();
581 
582  $actions = [
583  $this->lng->txt("cont_tab_add_above") => "addAbove",
584  $this->lng->txt("cont_tab_add_below") => "addBelow",
585  $this->lng->txt("cont_tab_move_up") => "moveUp",
586  $this->lng->txt("cont_tab_move_down") => "moveDown",
587  $this->lng->txt("cont_tab_move_top") => "moveTop",
588  $this->lng->txt("cont_tab_move_bottom") => "moveBottom",
589  $this->lng->txt("cont_tab_delete") => "deletePanel"
590  ];
591 
592  $captions = $tabs->getCaptions();
593  $cnt = 1;
594  foreach ($captions as $cap) {
595  $this->ctrl->setParameter($this, "cap_pc_id", $cap["pc_id"]);
596  $form = $this->getCaptionForm($cap["caption"]);
597  $components = $this->gui->modal($this->lng->txt("cont_edit_title"))
598  ->form($form)->getTriggerButtonComponents(
599  $this->lng->txt("cont_edit_title"),
600  true
601  );
602  $items[] = $components["modal"];
603  $dd_items = [$components["button"]];
604  foreach ($actions as $lng => $act) {
605  if ($cnt === 1 && in_array($act, ["moveUp", "moveTop"])) {
606  continue;
607  }
608  if ($cnt === count($captions) && in_array($act, ["moveDown", "moveBottom"])) {
609  continue;
610  }
611  $dd_items[] = $ui->factory()->link()->standard(
612  $lng,
613  $this->ctrl->getLinkTarget($this, $act)
614  );
615  }
616  $dd = $ui->factory()->dropdown()->standard($dd_items);
617  $content = $this->getTabContent($cap["pc_id"]);
618  $items[] = $ui->factory()->panel()->standard(
619  $cap["caption"],
620  $ui->factory()->legacy($content)
621  )
622  ->withActions($dd);
623  $cnt++;
624  }
625 
626  return $ui->renderer()->render($items);
627  }
628 
629  protected function getTabContent(string $pc_id): string
630  {
632  $tabs = $this->content_obj;
633  $xml = $tabs->getNodeXml($pc_id);
634 
635  $xml = "<dummy>" . $xml . $this->getPage()->getMultimediaXML() . "</dummy>";
636 
637  $wb_path = ilFileUtils::getWebspaceDir("output") . "/";
638  $params = array('mode' => "presentation", 'enlarge_path' => "#",
639  'fullscreen_link' => "#",
640  'pg_frame' => "", 'webspace_path' => $wb_path);
641  $output = $this->xsl->process($xml, $params);
642 
643  $defs = $this->pc_def->getPCDefinitions();
644  foreach ($defs as $def) {
645  $pc_class = $def["pc_class"];
646  $pc_obj = new $pc_class($this->getPage());
647 
648  // post xsl page content modification by pc elements
649  $output = $pc_obj->modifyPageContentPostXsl($output, "presentation", false);
650  }
651 
652  return $output;
653  }
654 
655  protected function saveCaption(): void
656  {
658  $tabs = $this->content_obj;
659 
660  $form = $this->getCaptionForm();
661  if ($form->isValid()) {
662  $pc_id = $this->request->getString("cap_pc_id");
663  $tabs->saveCaption($pc_id, $form->getData("caption"));
664  $this->updated = $this->pg_obj->update();
665  }
666  $this->ctrl->redirect($this, "edit");
667  }
668 
669  protected function addAbove(): void
670  {
672  $tabs = $this->content_obj;
673  $pc_id = $this->request->getString("cap_pc_id");
674  $tabs->addAbove($pc_id, $this->lng->txt("cont_new_tab"));
675  $this->updated = $this->pg_obj->update();
676  $this->ctrl->redirect($this, "edit");
677  }
678 
679  protected function addBelow(): void
680  {
682  $tabs = $this->content_obj;
683  $pc_id = $this->request->getString("cap_pc_id");
684  $tabs->addBelow($pc_id, $this->lng->txt("cont_new_tab"));
685  $this->updated = $this->pg_obj->update();
686  $this->ctrl->redirect($this, "edit");
687  }
688 
689  protected function moveUp(): void
690  {
692  $tabs = $this->content_obj;
693  $pc_id = $this->request->getString("cap_pc_id");
694  $tabs->moveUp($pc_id);
695  $this->updated = $this->pg_obj->update();
696  $this->ctrl->redirect($this, "edit");
697  }
698 
699  protected function moveDown(): void
700  {
702  $tabs = $this->content_obj;
703  $pc_id = $this->request->getString("cap_pc_id");
704  $tabs->moveDown($pc_id);
705  $this->updated = $this->pg_obj->update();
706  $this->ctrl->redirect($this, "edit");
707  }
708 
709  protected function moveTop(): void
710  {
712  $tabs = $this->content_obj;
713  $pc_id = $this->request->getString("cap_pc_id");
714  $tabs->moveTop($pc_id);
715  $this->updated = $this->pg_obj->update();
716  $this->ctrl->redirect($this, "edit");
717  }
718 
719  protected function moveBottom(): void
720  {
722  $tabs = $this->content_obj;
723  $pc_id = $this->request->getString("cap_pc_id");
724  $tabs->moveBottom($pc_id);
725  $this->updated = $this->pg_obj->update();
726  $this->ctrl->redirect($this, "edit");
727  }
728 
729  protected function deletePanel(): void
730  {
732  $tabs = $this->content_obj;
733  $pc_id = $this->request->getString("cap_pc_id");
734  $tabs->deletePanel($pc_id);
735  $this->updated = $this->pg_obj->update();
736  $this->ctrl->redirect($this, "edit");
737  }
738 
739 }
static getWebspaceDir(string $mode="filesystem")
get webspace directory
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
editProperties(bool $init_form=true)
static _lookupTemplateIdByName(int $a_style_id, string $a_name)
Lookup table template preview.
This class represents a selection list property in a property form.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
redirect(object $a_gui_obj, string $a_cmd=null, string $a_anchor=null, bool $is_async=false)
getItemByPostVar(string $a_post_var)
saveTabs()
Save tabs properties in db and return to page edit screen.
if(! $DIC->user() ->getId()||!ilLTIConsumerAccess::hasCustomProviderCreationAccess()) $params
Definition: ltiregstart.php:33
insert(bool $a_omit_form_init=false)
Insert new tabs.
Class ChatMainBarProvider .
checkWidthHeight(ilPropertyFormGUI $form)
setHierId(string $a_hier_id)
set hierarchical id in dom object
setOptions(array $a_options)
ilToolbarGUI $toolbar
getCaptionForm(string $caption="")
ilDBInterface $db
getInput(string $a_post_var, bool $ensureValidation=true)
Returns the input of an item, if item provides getInput method and as fallback the value of the HTTP-...
Content object of ilPageObject (see ILIAS DTD).
global $DIC
Definition: feed.php:28
addTab()
Save tabs properties in db and return to page edit screen.
const ACCORDION_HOR
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
User Interface for Editing of Page Content Objects (Paragraphs, Tables, ...)
This class represents a property in a property form.
__construct(VocabulariesInterface $vocabularies)
static addCss()
Add required css.
setContent(string $a_html)
Sets content for standard template.
initForm(string $a_mode="edit")
ilPropertyFormGUI $form
Class ilPageObject Handles PageObjects of ILIAS Learning Modules (see ILIAS DTD)
ilGlobalTemplateInterface $tpl
const ACCORDION_VER
getEditorScriptTag(string $form_pc_id="", string $form_cname="")
form( $class_path, string $cmd, string $submit_caption="")
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
ILIAS COPage Xsl XslManager $xsl
const CAROUSEL
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setParameter(object $a_gui_obj, string $a_parameter, $a_value)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(ilPageObject $a_pg_obj, ?ilPageContent $a_content_obj, string $a_hier_id, string $a_pc_id="")
getTemplateOptions(string $a_type="")
Get table templates.
ILIAS COPage PC PCDefinition $pc_def