19 declare(strict_types=1);
36 $this->main_tpl = $dic[
'tpl'];
41 $this->dic->ctrl()->getNextClass($this);
42 $cmd = $this->dic->ctrl()->getCmd(self::DEFAULT_CMD);
45 case method_exists($this, $cmd):
50 $this->{self::DEFAULT_CMD}();
61 $this->main_tpl->setContent($form->getHTML());
66 $this->dic->language()->loadLanguageModule(
'cntr');
68 $form = new \ilPropertyFormGUI();
69 $form->setFormAction($this->dic->ctrl()->getFormAction($this,
'saveForm'));
70 $form->setTitle($this->dic->language()->txt(
'icon_settings'));
74 $form->addCommandButton(
'saveForm', $this->dic->language()->txt(
'save'));
84 throw new Exception(
'Not Implemented Exception!');
90 if ($form->checkInput()) {
91 $this->saveIcon($form);
93 $this->main_tpl->setOnScreenMessage(
'success', $this->dic->language()->txt(
'msg_obj_modified'),
true);
94 $this->dic->ctrl()->redirect($this,
'showForm');
97 $form->setValuesByPost();
103 $customIconFactory = $this->dic[
'object.customicons.factory'];
104 $customIcon = $customIconFactory->getByObjId($this->
object->getId(), $this->
object->getType());
107 $fileData = (array) $form->
getInput(
'icon');
110 if ($item && $item->getDeletionFlag()) {
111 $customIcon->remove();
114 if (isset($fileData[
'tmp_name']) && $fileData[
'tmp_name']) {
115 $customIcon->saveFromHttpRequest();
Customizing of pimple-DIC for ILIAS.
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
__construct(private readonly Container $dic, \ilObjectGUI $parentGui, private readonly \ilObject $object)
Class ilObjectGUI Basic methods of all Output classes.
addSettingsToForm(\ilPropertyFormGUI $form)
ilGlobalTemplateInterface $main_tpl
showForm(?\ilPropertyFormGUI $form=null)