58 public function __construct($a_data,
int $a_id,
bool $a_call_by_reference)
64 $this->file_object_settings = new \ILIAS\components\File\Settings\Form(
new General());
65 $this->ui_factory = $DIC->ui()->factory();
66 $this->ui_renderer = $DIC->ui()->renderer();
72 if (!$this->
access->checkAccess($permission,
'', $this->object->getRefId())) {
73 $this->
ilias->raiseError(
74 $this->
lng->txt(
'no_permission'),
75 $this->
ilias->error_obj->MESSAGE
82 return $this->ui_factory->input()->container()->form()->standard(
83 $this->
ctrl->getLinkTarget($this, self::CMD_SAVE_SETTINGS),
85 $this->file_object_settings->asFormSection(),
86 $this->preview_settings->asFormSection(),
94 $this->
lng->loadLanguageModule(
"file");
100 switch ($this->
ctrl->getNextClass($this)) {
101 case 'ilpermissiongui':
102 $this->tabs_gui->setTabActive(
'perm_settings');
104 $this->
ctrl->forwardCommand($perm_gui);
106 case strtolower(ilObjFileIconsOverviewGUI::class):
107 $this->tabs_gui->setTabActive(
'file_objects');
109 $this->tabs_gui->setSubTabActive(self::SUBTAB_SUFFIX_SPECIFIC_ICONS);
111 $this->
ctrl->forwardCommand($icon_overview);
114 $cmd = $this->
ctrl->getCmd(self::CMD_EDIT_SETTINGS);
115 $this->tabs_gui->setTabActive(
'file_objects');
118 case self::CMD_EDIT_SETTINGS:
122 case self::CMD_SAVE_SETTINGS:
127 throw new ilException(
"ilObjFileAccessSettingsGUI: Command not found: $cmd");
136 if ($this->rbac_system->checkAccess(
"visible,read", $this->object->getRefId())) {
137 $this->tabs_gui->addTarget(
139 $this->
ctrl->getLinkTarget($this, self::CMD_EDIT_SETTINGS),
140 [self::CMD_EDIT_SETTINGS, self::CMD_VIEW]
143 if ($this->rbac_system->checkAccess(
'edit_permission', $this->object->getRefId())) {
144 $this->tabs_gui->addTarget(
146 $this->
ctrl->getLinkTargetByClass(
'ilpermissiongui',
"perm"),
155 $this->tabs_gui->addSubTabTarget(
157 $this->
ctrl->getLinkTarget($this, self::CMD_EDIT_SETTINGS),
158 [self::CMD_EDIT_SETTINGS,
"view"]
160 $this->tabs_gui->addSubTabTarget(
161 self::SUBTAB_SUFFIX_SPECIFIC_ICONS,
162 $this->
ctrl->getLinkTargetByClass(ilObjFileIconsOverviewGUI::class, ilObjFileIconsOverviewGUI::CMD_INDEX),
163 [ilObjFileIconsOverviewGUI::CMD_INDEX,
"view"]
171 $this->tabs_gui->setSubTabActive(
"settings");
173 $this->tpl->setContent($this->ui_renderer->render($this->buildForm()));
179 $form = $form->withRequest($this->
http->request());
181 if ($form->getData() ===
null) {
182 $this->tpl->setContent($this->ui_renderer->render($form));
186 $this->tpl->setOnScreenMessage(
188 $this->
language->txt(
'settings_saved'),
191 $this->
ctrl->redirect($this, self::CMD_EDIT_SETTINGS);
prepareOutput(bool $show_sub_objects=true)
__construct($a_data, int $a_id, bool $a_call_by_reference)
Constructor.
checkAccess(string $permission)
Class ilObjFileAccessSettingsGUI.
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
static http()
Fetches the global http state from ILIAS.
ILIAS components File Settings Form $file_object_settings
This is how the factory for UI elements looks.
const SUBTAB_SUFFIX_SPECIFIC_ICONS
Class ilObjectGUI Basic methods of all Output classes.
Class ilObjForumAdministration.
__construct(Container $dic, ilPlugin $plugin)
language()
description: > Example for rendring a language glyph.
const CMD_SHOW_PREVIEW_RENDERERS