49 $nextClass = $this->dic->ctrl()->getNextClass($this);
50 $cmd = $this->dic->ctrl()->getCmd(self::DEFAULT_CMD);
53 case method_exists($this, $cmd):
58 $this->{self::DEFAULT_CMD}();
72 $this->dic->ui()->mainTemplate()->setContent(
$form->getHTML());
80 $this->dic->language()->loadLanguageModule(
'cntr');
82 $form = new \ilPropertyFormGUI();
83 $form->setFormAction($this->dic->ctrl()->getFormAction($this,
'saveForm'));
84 $form->setTitle($this->dic->language()->txt(
'icon_settings'));
86 $this->addSettingsToForm(
$form);
88 $form->addCommandButton(
'saveForm', $this->dic->language()->txt(
'save'));
101 $customIconFactory = $this->dic[
'object.customicons.factory'];
102 $customIcon = $customIconFactory->getByObjId($this->object->getId(), $this->
object->getType());
104 $icon = new \ilImageFileInputGUI($this->dic->language()->txt(
'cont_custom_icon'),
'icon');
105 if (is_string($this->uploadFieldInformationText)) {
106 $icon->setInfo($this->uploadFieldInformationText);
108 $icon->setSuffixes($customIcon->getSupportedFileExtensions());
109 $icon->setUseCache(
false);
110 if ($customIcon->exists()) {
111 $icon->setImage($customIcon->getFullPath());
125 $this->saveIcon($form);
127 ilUtil::sendSuccess($this->dic->language()->txt(
'msg_obj_modified'),
true);
128 $this->dic->ctrl()->redirect($this,
'showForm');
143 $customIconFactory = $this->dic[
'object.customicons.factory'];
144 $customIcon = $customIconFactory->getByObjId($this->object->getId(), $this->
object->getType());
147 $fileData = (array) $form->
getInput(
'icon');
150 if ($item->getDeletionFlag()) {
151 $customIcon->remove();
154 if ($fileData[
'tmp_name']) {
155 $customIcon->saveFromHttpRequest();
setUploadFieldInformationText($uploadFieldInformationText)
$uploadFieldInformationText
showForm(\ilPropertyFormGUI $form=null)
if(isset($_POST['submit'])) $form
__construct(\ILIAS\DI\Container $dic, $parentGui, \ilObject $object)
ilObjectCustomIconConfigurationGUI constructor.
Class ilObjectCustomIconConfigurationGUI.