ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
class.ilPCInteractiveImageGUI.php
Go to the documentation of this file.
1 <?php
2 
24 
32 {
33  protected \ILIAS\COPage\PC\InteractiveImage\IIMManager $iim_manager;
34  protected \ILIAS\COPage\PC\InteractiveImage\GUIService $iim_gui;
35  protected ilTabsGUI $tabs;
37 
38  public function __construct(
39  ilPageObject $a_pg_obj,
40  ?ilPageContent $a_content_obj,
41  string $a_hier_id,
42  string $a_pc_id = ""
43  ) {
44  global $DIC;
45 
46  $this->tpl = $DIC["tpl"];
47  $this->lng = $DIC->language();
48  $this->tabs = $DIC->tabs();
49  $this->ctrl = $DIC->ctrl();
50  $this->toolbar = $DIC->toolbar();
51  parent::__construct($a_pg_obj, $a_content_obj, $a_hier_id, $a_pc_id);
52  $this->iim_gui = $DIC->copage()->internal()->gui()->pc()->interactiveImage();
53  $this->iim_manager = $DIC->copage()->internal()->domain()->pc()->interactiveImage();
54  }
55 
56  public function executeCommand(): void
57  {
58  $tpl = $this->tpl;
59  $ilTabs = $this->tabs;
60 
61  // get next class that processes or forwards current command
62  $next_class = $this->ctrl->getNextClass($this);
63 
64  // get current command
65  $cmd = $this->ctrl->getCmd();
66 
67  if (is_object($this->content_obj)) {
68  $tpl->setTitleIcon(ilUtil::getImagePath("standard/icon_mob.svg"));
69  $this->getTabs();
70  }
71 
72  switch ($next_class) {
73  case strtolower(ilRepoStandardUploadHandlerGUI::class):
75  break;
76 
77  default:
78  $this->$cmd();
79  break;
80  }
81  }
82 
83  protected function forwardFormToUploadHandler(): void
84  {
85  switch($this->request->getString("mode")) {
86  case "overlayUpload":
87  $form = $this->getOverlayUploadFormAdapter();
88  $gui = $form->getRepoStandardUploadHandlerGUI("overlay_file");
89  break;
90 
91  case "backgroundUpdate":
92  $form = $this->getBackgroundPropertiesFormAdapter();
93  $gui = $form->getRepoStandardUploadHandlerGUI("input_file");
94  break;
95 
96  default:
97  $form = $this->getImportFormAdapter();
98  $gui = $form->getRepoStandardUploadHandlerGUI("input_file");
99  break;
100  }
101  $this->ctrl->forwardCommand($gui);
102  }
103 
107  public function getTabs(
108  bool $a_create = false,
109  bool $a_change_obj_ref = false
110  ): void {
111  $ilCtrl = $this->ctrl;
112  $ilTabs = $this->tabs;
113  $lng = $this->lng;
114 
115  if (!$a_create) {
116  $ilTabs->setBackTarget(
117  $lng->txt("pg"),
118  (string) $ilCtrl->getParentReturn($this)
119  );
120  }
121  }
122 
126  public function insert(
127  string $a_post_cmd = "edpost",
128  string $a_submit_cmd = "create_mob",
129  bool $a_input_error = false
130  ): void {
131  $tpl = $this->tpl;
132  $ilCtrl = $this->ctrl;
133  $lng = $this->lng;
134 
135  $this->tpl->setOnScreenMessage('info', $lng->txt("cont_iim_create_info"));
136 
137  $form = $this->initForm("create");
138  $form->setFormAction($ilCtrl->getFormAction($this));
139 
140  $this->displayValidationError();
141 
142  $tpl->setContent($form->getHTML());
143  }
144 
145  public function edit(): void
146  {
147  $ilCtrl = $this->ctrl;
148  $ilCtrl->redirect($this, "editor");
149  }
150 
151  public function editBaseImage(): void
152  {
153  $tpl = $this->tpl;
154  $ilTabs = $this->tabs;
155  $ilTabs->activateTab("edit_base_image");
156  $form = $this->initForm();
157  $tpl->setContent($form->getHTML());
158  }
159 
160 
161  public function initForm(string $a_mode = "edit"): ilPropertyFormGUI
162  {
163  $lng = $this->lng;
164  $ilCtrl = $this->ctrl;
165  $ti = null;
166 
167  $form = new ilPropertyFormGUI();
168 
169  // image file
170  $fi = new ilImageFileInputGUI($lng->txt("cont_file"), "image_file");
171  $fi->setAllowDeletion(false);
172  if ($a_mode == "edit") {
173  $fi->setImage($this->content_obj->getBaseThumbnailTarget());
174  } else {
175  $fi->setRequired(true);
176  }
177  $form->addItem($fi);
178 
179  if ($a_mode == "edit") {
180  // caption
181  $ti = new ilTextInputGUI($this->lng->txt("cont_caption"), "caption");
182  $ti->setMaxLength(200);
183  $ti->setSize(50);
184  $form->addItem($ti);
185  }
186 
187  // save and cancel commands
188  if ($a_mode == "create") {
189  $form->setTitle($lng->txt("cont_ed_insert_iim"));
190  $form->addCommandButton("create_iim", $lng->txt("save"));
191  $form->addCommandButton("cancelCreate", $lng->txt("cancel"));
192  } else {
193  // get caption
194  $std_alias_item = new ilMediaAliasItem(
195  $this->content_obj->getDomDoc(),
196  $this->getHierId(),
197  "Standard",
198  $this->content_obj->getPCId(),
199  "InteractiveImage"
200  );
201  $ti->setValue($std_alias_item->getCaption());
202 
203  $form->setTitle($lng->txt("cont_edit_base_image"));
204  $form->addCommandButton("update", $lng->txt("save"));
205  }
206 
207  $form->setFormAction($ilCtrl->getFormAction($this));
208 
209  return $form;
210  }
211 
212  public function create(): void
213  {
214  $ilCtrl = $this->ctrl;
215  $lng = $this->lng;
216  $tpl = $this->tpl;
217 
218  $form = $this->initForm("create");
219  if (!$form->checkInput()) {
220  $this->displayValidationError();
221  $form->setValuesByPost();
222  $tpl->setContent($form->getHTML());
223  return;
224  }
225 
226  $this->content_obj = new ilPCInteractiveImage($this->getPage());
227  $this->content_obj->createMediaObject();
228  $media_obj = $this->content_obj->getMediaObject();
229  $media_obj->setTitle($_FILES['image_file']['name']);
230  $media_obj->create();
231  $mob_dir = ilObjMediaObject::_getDirectory($media_obj->getId());
232  // $media_obj->setStandardType("File");
233  $media_obj->createDirectory();
234  $media_item = new ilMediaItem();
235  $media_obj->addMediaItem($media_item);
236  $media_item->setPurpose("Standard");
237 
238  $file = $mob_dir . "/" . $_FILES['image_file']['name'];
239  try {
241  $_FILES['image_file']['tmp_name'],
242  $_FILES['image_file']['name'],
243  $file
244  );
245  } catch (ilException $e) {
246  $this->tpl->setOnScreenMessage('failure', $this->lng->txt("file_is_infected"), true);
247  return;
248  }
249  // get mime type
250  $format = ilObjMediaObject::getMimeType($file);
251  $location = $_FILES['image_file']['name'];
252 
253  // set real meta and object data
254  $media_item->setFormat($format);
255  $media_item->setLocation($location);
256  $media_item->setLocationType("LocalFile");
257 
259  $media_obj->update();
260 
261  $this->content_obj->createAlias($this->pg_obj, $this->hier_id, $this->pc_id);
262  $this->updated = $this->pg_obj->update();
263  if ($this->updated === true) {
264  $this->pg_obj->stripHierIDs();
265  $this->pg_obj->addHierIDs();
266  $ilCtrl->setParameter($this, "hier_id", $this->content_obj->readHierId());
267  $ilCtrl->setParameter($this, "pc_id", $this->content_obj->readPCId());
268  $this->content_obj->setHierId($this->content_obj->readHierId());
269  $this->setHierId($this->content_obj->readHierId());
270  $this->content_obj->setPcId($this->content_obj->readPCId());
271  $this->tpl->setOnScreenMessage('success', $lng->txt("cont_saved_interactive_image"), true);
272  $this->ctrl->redirectByClass("ilpcinteractiveimagegui", "edit");
273 
274  //$this->ctrl->returnToParent($this, "jump".$this->hier_id);
275  } else {
276  $this->insert();
277  }
278  }
279 
283  public function update(): void
284  {
285  $ilCtrl = $this->ctrl;
286  $lng = $this->lng;
287 
288  $form = $this->initForm("edit");
289  if ($form->checkInput()) {
290  $mob = $this->content_obj->getMediaObject();
291  $mob_dir = ilObjMediaObject::_getDirectory($mob->getId());
292  $std_item = $mob->getMediaItem("Standard");
293  $location = $_FILES['image_file']['name'];
294 
295  if ($location != "" && is_file($_FILES['image_file']['tmp_name'])) {
296  $file = $mob_dir . "/" . $_FILES['image_file']['name'];
298  $_FILES['image_file']['tmp_name'],
299  $_FILES['image_file']['name'],
300  $file
301  );
302 
303  // get mime type
304  $format = ilObjMediaObject::getMimeType($file);
305  $location = $_FILES['image_file']['name'];
306  $std_item->setFormat($format);
307  $std_item->setLocation($location);
308  $std_item->setLocationType("LocalFile");
309  $mob->setDescription($format);
310  $mob->update();
311  }
312 
313  // set caption
314  $std_alias_item = new ilMediaAliasItem(
315  $this->content_obj->getDomDoc(),
316  $this->getHierId(),
317  "Standard",
318  $this->content_obj->getPCId(),
319  "InteractiveImage"
320  );
321  $std_alias_item->setCaption(
322  $form->getInput("caption")
323  );
324  $this->edit_repo->setPageError($this->pg_obj->update());
325  $this->tpl->setOnScreenMessage('success', $lng->txt("msg_obj_modified"), true);
326  }
327 
328  $ilCtrl->redirectByClass("ilpcinteractiveimagegui", "editBaseImage");
329  }
330 
331 
335  public function centerAlign(): void
336  {
337  $std_alias_item = new ilMediaAliasItem(
338  $this->content_obj->getDomDoc(),
339  $this->getHierId(),
340  "Standard",
341  $this->content_obj->getPCId(),
342  "InteractiveImage"
343  );
344  $std_alias_item->setHorizontalAlign("Center");
345  $this->updateAndReturn();
346  }
347 
351  public function leftAlign(): void
352  {
353  $std_alias_item = new ilMediaAliasItem(
354  $this->dom,
355  $this->getHierId(),
356  "Standard",
357  $this->content_obj->getPCId(),
358  "InteractiveImage"
359  );
360  $std_alias_item->setHorizontalAlign("Left");
361  $this->updateAndReturn();
362  }
363 
367  public function rightAlign(): void
368  {
369  $std_alias_item = new ilMediaAliasItem(
370  $this->content_obj->getDomDoc(),
371  $this->getHierId(),
372  "Standard",
373  $this->content_obj->getPCId(),
374  "InteractiveImage"
375  );
376  $std_alias_item->setHorizontalAlign("Right");
377  $this->updateAndReturn();
378  }
379 
383  public function leftFloatAlign(): void
384  {
385  $std_alias_item = new ilMediaAliasItem(
386  $this->content_obj->getDomDoc(),
387  $this->getHierId(),
388  "Standard",
389  $this->content_obj->getPCId(),
390  "InteractiveImage"
391  );
392  $std_alias_item->setHorizontalAlign("LeftFloat");
393  $this->updateAndReturn();
394  }
395 
399  public function rightFloatAlign(): void
400  {
401  $std_alias_item = new ilMediaAliasItem(
402  $this->content_obj->getDomDoc(),
403  $this->getHierId(),
404  "Standard",
405  $this->content_obj->getPCId(),
406  "InteractiveImage"
407  );
408  $std_alias_item->setHorizontalAlign("RightFloat");
409  $this->updateAndReturn();
410  }
411 
415 
416  public function listOverlayImages(): void
417  {
418  $tpl = $this->tpl;
419  $ilToolbar = $this->toolbar;
420  $ilCtrl = $this->ctrl;
421  $ilTabs = $this->tabs;
422  $lng = $this->lng;
423 
424  $this->tpl->setOnScreenMessage('info', $lng->txt("cont_iim_overlay_info"));
425 
426  $ilTabs->setTabActive("list_overlays");
427 
428  $ilToolbar->addButton(
429  $lng->txt("cont_add_images"),
430  $ilCtrl->getLinkTarget($this, "addOverlayImages")
431  );
432 
433  $tab = new ilPCIIMOverlaysTableGUI(
434  $this,
435  "listOverlayImages",
436  $this->content_obj->getMediaObject()
437  );
438  $tpl->setContent($tab->getHTML());
439  }
440 
441  public function addOverlayImages(ilPropertyFormGUI $a_form = null): void
442  {
443  $tpl = $this->tpl;
444 
445  if ($a_form) {
446  $form = $a_form;
447  } else {
448  $form = $this->initAddOverlaysForm();
449  }
450 
451  $tpl->setContent($form->getHTML());
452  }
453 
455  {
456  $lng = $this->lng;
457  $ilCtrl = $this->ctrl;
458  $ilTabs = $this->tabs;
459 
460  $ilTabs->setTabActive("list_overlays");
461 
462  $form = new ilPropertyFormGUI();
463  $form->setTitle($lng->txt("cont_add_images"));
464  $form->setFormAction($ilCtrl->getFormAction($this));
465 
466  // file input
467  $fi = new ilFileWizardInputGUI($lng->txt("file"), "ovfile");
468  $fi->setSuffixes(array("gif", "jpeg", "jpg", "png"));
469  $fi->setFilenames(array(0 => ''));
470  $fi->setRequired(true);
471  $form->addItem($fi);
472 
473  $form->addCommandButton("uploadOverlayImages", $lng->txt("upload"));
474  $form->addCommandButton("listOverlayImages", $lng->txt("cancel"));
475 
476  return $form;
477  }
478 
479  public function uploadOverlayImages(): void
480  {
481  $lng = $this->lng;
482  $ilCtrl = $this->ctrl;
483 
484  $form = $this->initAddOverlaysForm();
485  if ($form->checkInput()) {
486  if (is_array($_FILES["ovfile"]["name"])) {
487  foreach ($_FILES["ovfile"]["name"] as $k => $v) {
488  $name = $_FILES["ovfile"]["name"][$k];
489  $tmp_name = $_FILES["ovfile"]["tmp_name"][$k];
490 
491  $this->content_obj->getMediaObject()->uploadAdditionalFile(
492  $name,
493  $tmp_name,
494  "overlays"
495  );
496  $piname = pathinfo($name);
497  $this->content_obj->getMediaObject()->makeThumbnail(
498  "overlays/" . $name,
499  basename($name, "." . $piname['extension']) . ".png"
500  );
501  }
502  }
503  $this->tpl->setOnScreenMessage('success', $lng->txt("msg_obj_modified"));
504  $ilCtrl->redirect($this, "listOverlayImages");
505  } else {
506  $form->setValuesByPost();
507  $this->addOverlayImages($form);
508  }
509  }
510 
511  public function confirmDeleteOverlays(): void
512  {
513  $ilCtrl = $this->ctrl;
514  $tpl = $this->tpl;
515  $lng = $this->lng;
516  $ilTabs = $this->tabs;
517 
518  $ilTabs->setTabActive("list_overlays");
519 
520  $files = $this->request->getStringArray("file");
521  if (count($files) == 0) {
522  $this->tpl->setOnScreenMessage('failure', $lng->txt("no_checkbox"), true);
523  $ilCtrl->redirect($this, "listOverlayImages");
524  } else {
525  $cgui = new ilConfirmationGUI();
526  $cgui->setFormAction($ilCtrl->getFormAction($this));
527  $cgui->setHeaderText($lng->txt("cont_really_delete_overlays"));
528  $cgui->setCancel($lng->txt("cancel"), "listOverlayImages");
529  $cgui->setConfirm($lng->txt("delete"), "deleteOverlays");
530 
531  foreach ($files as $i => $d) {
532  $cgui->addItem("file[]", $i, $i);
533  }
534 
535  $tpl->setContent($cgui->getHTML());
536  }
537  }
538 
539  public function deleteOverlays(): void
540  {
541  $ilCtrl = $this->ctrl;
542  $lng = $this->lng;
543 
544  $files = $this->request->getStringArray("file");
545  if (count($files) > 0) {
546  foreach ($files as $f) {
547  $f = str_replace("..", "", ilUtil::stripSlashes($f));
548  $this->content_obj->getMediaObject()
549  ->removeAdditionalFile("overlays/" . $f);
550  }
551 
552  $this->tpl->setOnScreenMessage('success', $lng->txt("cont_overlays_have_been_deleted"), true);
553  }
554  $ilCtrl->redirect($this, "listOverlayImages");
555  }
556 
557 
561 
562  public function listContentPopups(): void
563  {
564  $tpl = $this->tpl;
565  $ilToolbar = $this->toolbar;
566  $ilCtrl = $this->ctrl;
567  $ilTabs = $this->tabs;
568  $lng = $this->lng;
569 
570  $this->tpl->setOnScreenMessage('info', $lng->txt("cont_iim_content_popups_info"));
571 
572  $ilTabs->setTabActive("content_popups");
573 
574  $ilToolbar->addButton(
575  $lng->txt("cont_add_popup"),
576  $ilCtrl->getLinkTarget($this, "addPopup")
577  );
578 
580  $iim = $this->content_obj;
581  $tab = new ilPCIIMPopupTableGUI(
582  $this,
583  "listContentPopups",
584  $iim
585  );
586  $tpl->setContent($tab->getHTML());
587  }
588 
589  public function addPopup(): void
590  {
591  $ilCtrl = $this->ctrl;
592  $lng = $this->lng;
593 
594  $this->content_obj->addContentPopup();
595  $this->pg_obj->update();
596  $this->tpl->setOnScreenMessage('success', $lng->txt("msg_obj_modified"), true);
597  $ilCtrl->redirect($this, "listContentPopups");
598  }
599 
600  public function savePopups(): void
601  {
602  $ilCtrl = $this->ctrl;
603  $lng = $this->lng;
604 
605  $titles = $this->request->getStringArray("title");
606  if (count($titles) > 0) {
607  $this->content_obj->savePopups($titles);
608  $this->pg_obj->update();
609  $this->tpl->setOnScreenMessage('success', $lng->txt("msg_obj_modified"), true);
610  }
611  $ilCtrl->redirect($this, "listContentPopups");
612  }
613 
614  public function confirmPopupDeletion(): void
615  {
616  $ilCtrl = $this->ctrl;
617  $tpl = $this->tpl;
618  $lng = $this->lng;
619  $ilTabs = $this->tabs;
620 
621  $ilTabs->setTabActive("content_popups");
622 
623  $tids = $this->request->getStringArray("tid");
624  $titles = $this->request->getStringArray("title");
625 
626  if (count($tids) == 0) {
627  $this->tpl->setOnScreenMessage('failure', $lng->txt("no_checkbox"), true);
628  $ilCtrl->redirect($this, "listContentPopups");
629  } else {
630  $cgui = new ilConfirmationGUI();
631  $cgui->setFormAction($ilCtrl->getFormAction($this));
632  $cgui->setHeaderText($lng->txt("cont_really_delete_popups"));
633  $cgui->setCancel($lng->txt("cancel"), "listContentPopups");
634  $cgui->setConfirm($lng->txt("delete"), "deletePopups");
635 
636  foreach ($tids as $i => $d) {
637  $cgui->addItem("tid[]", $i, $titles[$i]);
638  }
639 
640  $tpl->setContent($cgui->getHTML());
641  }
642  }
643 
644  public function deletePopups(): void
645  {
646  $lng = $this->lng;
647  $ilCtrl = $this->ctrl;
648 
649  $tids = $this->request->getStringArray("tid");
650 
651  if (count($tids) > 0) {
652  foreach ($tids as $id) {
653  $id = explode(":", $id);
654  $this->content_obj->deletePopup($id[0], $id[1]);
655  }
656  $this->pg_obj->update();
657  $this->tpl->setOnScreenMessage('success', $lng->txt("cont_popups_have_been_deleted"), true);
658  }
659  $ilCtrl->redirect($this, "listContentPopups");
660  }
661 
662  public function getImportFormAdapter(): \ILIAS\Repository\Form\FormAdapterGUI
663  {
664  $this->ctrl->setParameter($this, "cname", "InteractiveImage");
665  $form = $this->gui->form([self::class], "#")
666  ->async()
667  ->section("f", $this->lng->txt("cont_ed_insert_iim"))
668  ->file(
669  "input_file",
670  $this->lng->txt("file"),
671  \Closure::fromCallable([$this, 'handleUploadResult']),
672  "mob_id",
673  "",
674  1,
675  [],
676  [self::class],
677  "copg"
678  )->required();
679  return $form;
680  }
681 
682  public function handleUploadResult(
683  FileUpload $upload,
684  UploadResult $result
685  ): BasicHandlerResult {
686  return $this->iim_manager->handleUploadResult($upload, $result);
687  }
688 
689  public function editor(): void
690  {
691  $ilTabs = $this->tabs;
692  $ilTabs->activateTab("editor");
693  $this->tpl->addCss(ilObjStyleSheet::getBaseContentStylePath());
694  $this->tpl->setContent($this->iim_gui->editorInit()->getInitHtml());
696  }
697 
698  protected function initInteractiveImageEditor(): void
699  {
700  $this->setEditorToolContext();
701  $this->iim_gui->editorInit()->initUI($this->tpl);
702  }
703 
704  public function getOverlayUploadFormAdapter(array $path = null): \ILIAS\Repository\Form\FormAdapterGUI
705  {
706  if (is_null($path)) {
707  $path = [self::class];
708  }
709 
710  $f = $this->gui->form($path, "#")
711  ->async()
712  ->file(
713  "overlay_file",
714  $this->lng->txt("file"),
715  \Closure::fromCallable([$this, 'handleOverlayUpload']),
716  "mob_id",
717  "",
718  1,
719  ["image/png", "image/jpeg", "image/gif"],
720  $path,
721  "copg"
722  );
723  return $f;
724  }
725 
726 
727  public function handleOverlayUpload(
728  FileUpload $upload,
729  UploadResult $result
730  ): BasicHandlerResult {
731  return $this->iim_manager->handleOverlayUpload(
732  $this->content_obj->getMediaObject(),
733  $upload,
734  $result
735  );
736  }
737 
738  public function getPopupFormAdapter(): \ILIAS\Repository\Form\FormAdapterGUI
739  {
740  $f = $this->gui->form(null, "#")
741  ->text(
742  "title",
743  $this->lng->txt("title")
744  );
745  return $f;
746  }
747 
748  public function getBackgroundPropertiesFormAdapter(array $path = null): \ILIAS\Repository\Form\FormAdapterGUI
749  {
750  if (is_null($path)) {
751  $path = [self::class];
752  }
753 
754  $f = $this->gui->form($path, "#")
755  ->async()
756  ->file(
757  "input_file",
758  $this->lng->txt("file"),
759  \Closure::fromCallable([$this, 'handleBackgroundUpload']),
760  "mob_id",
761  "",
762  1,
763  ["image/png", "image/jpeg", "image/gif"],
764  $path,
765  "copg"
766  )->text(
767  "caption",
768  $this->lng->txt("cont_caption")
769  );
770  return $f;
771  }
772 
773 
774  public function handleBackgroundUpload(
775  FileUpload $upload,
776  UploadResult $result
777  ): BasicHandlerResult {
778  $this->log->debug(">>>");
779  $this->log->debug("Start upload");
780  $this->log->debug($this->content_obj->getMediaObject()->getId());
781  return $this->iim_manager->handleUploadResult(
782  $upload,
783  $result,
784  $this->content_obj->getMediaObject()
785  );
786  }
787 
788 }
centerAlign()
Align media object to center.
__construct(ilPageObject $a_pg_obj, ?ilPageContent $a_content_obj, string $a_hier_id, string $a_pc_id="")
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)
setCaption(string $a_caption)
handleUploadResult(FileUpload $upload, UploadResult $result)
$location
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: buildRTE.php:22
Class ChatMainBarProvider .
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")
static getImagePath(string $img, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
This class represents a file wizard property in a property form.
getTabs(bool $a_create=false, bool $a_change_obj_ref=false)
Add tabs to ilTabsGUI object.
setHierId(string $a_hier_id)
set hierarchical id in dom object
setSuffixes(array $a_suffixes)
handleOverlayUpload(FileUpload $upload, UploadResult $result)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setTitleIcon(string $a_icon_path, string $a_icon_desc="")
set title icon
Content object of ilPageObject (see ILIAS DTD).
$path
Definition: ltiservices.php:32
setTabActive(string $a_id)
getBackgroundPropertiesFormAdapter(array $path=null)
global $DIC
Definition: feed.php:28
static renameExecutables(string $a_dir)
insert(string $a_post_cmd="edpost", string $a_submit_cmd="create_mob", bool $a_input_error=false)
Insert new media object form.
User Interface for Editing of Page Content Objects (Paragraphs, Tables, ...)
static _getDirectory(int $a_mob_id)
Get absolute directory.
__construct(VocabulariesInterface $vocabularies)
static getMimeType(string $a_file, bool $a_external=false)
get mime type for file
setContent(string $a_html)
Sets content for standard template.
Class ilPageObject Handles PageObjects of ILIAS Learning Modules (see ILIAS DTD)
handleBackgroundUpload(FileUpload $upload, UploadResult $result)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilGlobalTemplateInterface $tpl
rightFloatAlign()
align media object to right, floating text
static moveUploadedFile(string $a_file, string $a_name, string $a_target, bool $a_raise_errors=true, string $a_mode="move_uploaded")
move uploaded file
Class FileUpload.
Definition: FileUpload.php:34
addOverlayImages(ilPropertyFormGUI $a_form=null)
This class represents an image file property in a property form.
activateTab(string $a_id)
leftFloatAlign()
align media object to left, floating text
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
leftAlign()
align media object to left
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ILIAS COPage PC InteractiveImage GUIService $iim_gui
rightAlign()
align media object to right
User interface class for interactive images.
setHorizontalAlign(string $a_halign)
ILIAS COPage InternalGUIService $gui
ILIAS COPage PC InteractiveImage IIMManager $iim_manager