58 public function __construct($a_data,
int $a_id,
bool $a_call_by_reference)
63 $this->write_access = $this->
access->checkAccess(
'write',
'', $this->
object->getRefId());
64 $this->preview_settings =
new Form(
68 $this->file_object_settings = new \ILIAS\components\File\Settings\Form(
72 $this->ui_factory =
$DIC->ui()->factory();
73 $this->ui_renderer =
$DIC->ui()->renderer();
79 if (!$this->
access->checkAccess($permission,
'', $this->object->getRefId())) {
80 $this->
ilias->raiseError(
81 $this->
lng->txt(
'no_permission'),
82 $this->ilias->error_obj->MESSAGE
89 return $this->ui_factory->input()->container()->form()->standard(
90 $this->
ctrl->getLinkTarget($this, self::CMD_SAVE_SETTINGS),
92 $this->file_object_settings->asFormSection(),
93 $this->preview_settings->asFormSection(),
101 $this->
lng->loadLanguageModule(
"file");
107 switch ($this->
ctrl->getNextClass($this)) {
108 case 'ilpermissiongui':
109 $this->tabs_gui->setTabActive(
'perm_settings');
111 $this->
ctrl->forwardCommand($perm_gui);
113 case strtolower(ilObjFileIconsOverviewGUI::class):
114 $this->tabs_gui->setTabActive(
'file_objects');
116 $this->tabs_gui->setSubTabActive(self::SUBTAB_SUFFIX_SPECIFIC_ICONS);
118 $this->
ctrl->forwardCommand($icon_overview);
121 $cmd = $this->
ctrl->getCmd(self::CMD_EDIT_SETTINGS);
122 $this->tabs_gui->setTabActive(
'file_objects');
134 throw new ilException(
"ilObjFileAccessSettingsGUI: Command not found: $cmd");
143 if ($this->rbac_system->checkAccess(
"read", $this->object->getRefId())) {
144 $this->tabs_gui->addTarget(
146 $this->
ctrl->getLinkTarget($this, self::CMD_EDIT_SETTINGS),
147 [self::CMD_EDIT_SETTINGS, self::CMD_VIEW]
150 if ($this->rbac_system->checkAccess(
'edit_permission', $this->object->getRefId())) {
151 $this->tabs_gui->addTarget(
153 $this->
ctrl->getLinkTargetByClass(
'ilpermissiongui',
"perm"),
162 $this->tabs_gui->addSubTabTarget(
164 $this->
ctrl->getLinkTarget($this, self::CMD_EDIT_SETTINGS),
165 [self::CMD_EDIT_SETTINGS,
"view"]
167 $this->tabs_gui->addSubTabTarget(
168 self::SUBTAB_SUFFIX_SPECIFIC_ICONS,
169 $this->
ctrl->getLinkTargetByClass(ilObjFileIconsOverviewGUI::class, ilObjFileIconsOverviewGUI::CMD_INDEX),
170 [ilObjFileIconsOverviewGUI::CMD_INDEX,
"view"]
178 $this->tabs_gui->setSubTabActive(
"settings");
179 $this->tpl->setContent($this->ui_renderer->render($this->buildForm()));
185 $form = $form->withRequest($this->
http->request());
187 if ($form->getData() ===
null) {
188 $this->tpl->setContent($this->ui_renderer->render($form));
192 $this->tpl->setOnScreenMessage(
194 $this->
language->txt(
'settings_saved'),
197 $this->
ctrl->redirect($this, self::CMD_EDIT_SETTINGS);
Builds a Color from either hex- or rgb values.
Base class for ILIAS Exception handling.
Class ilObjFileAccessSettingsGUI.
checkAccess(string $permission)
__construct($a_data, int $a_id, bool $a_call_by_reference)
Constructor.
ILIAS components File Settings Form $file_object_settings
getAdminTabs()
administration tabs show only permissions and trash folder
const CMD_SHOW_PREVIEW_RENDERERS
const SUBTAB_SUFFIX_SPECIFIC_ICONS
Class ilObjectGUI Basic methods of all Output classes.
prepareOutput(bool $show_sub_objects=true)
This is how the factory for UI elements looks.
An entity that renders components to a string output.
static http()
Fetches the global http state from ILIAS.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
Class ilObjForumAdministration.