35 string $a_parent_type,
38 bool $a_prevent_get_id =
false,
43 $this->tpl =
$DIC[
"tpl"];
44 $this->
ctrl = $DIC->ctrl();
45 $this->
tabs = $DIC->tabs();
46 $this->
lng = $DIC->language();
54 $this->layout_object->readObject();
59 "LOCATION_CONTENT_STYLESHEET",
71 $next_class = $this->
ctrl->getNextClass($this);
73 switch ($next_class) {
75 return parent::executeCommand();
78 $html = parent::executeCommand();
92 string $a_mode =
"save",
95 $ilTabs = $this->
tabs;
97 $ilTabs->setTabActive(
'properties');
102 $this->tpl->setContent($a_form->getHTML());
107 $ilCtrl = $this->ctrl;
112 $form_gui->setFormAction($ilCtrl->getFormAction($this));
113 $form_gui->setTitle(
$lng->txt(
"cont_ed_pglprop"));
117 $title_input->setSize(50);
118 $title_input->setMaxLength(128);
119 $title_input->setValue($this->layout_object->title);
120 $title_input->setTitle(
$lng->txt(
"title"));
121 $title_input->setRequired(
true);
125 $desc_input->setValue($this->layout_object->description);
126 $desc_input->setRows(3);
127 $desc_input->setCols(37);
128 $desc_input->setTitle(
$lng->txt(
"description"));
129 $desc_input->setRequired(
false);
134 $mods->setValue($this->layout_object->getModules());
137 $mods->addOption($mod);
140 $form_gui->addItem($title_input);
141 $form_gui->addItem($desc_input);
142 $form_gui->addItem($mods);
144 $form_gui->addCommandButton(
"updateProperties",
$lng->txt($a_mode));
153 $form = $this->initForm(
"save");
154 if (!$form->checkInput()) {
155 $form->setValuesByPost();
156 $this->properties(
"save", $form);
160 $this->layout_object->setTitle($form->getInput(
'pgl_title'));
161 $this->layout_object->setDescription($form->getInput(
'pgl_desc'));
162 $this->layout_object->setModules($form->getInput(
'module'));
163 $this->layout_object->update();
165 $this->tpl->setOnScreenMessage(
'info',
$lng->txt(
"saved_successfully"));
174 $ilTabs = $this->tabs;
175 $ilCtrl = $this->ctrl;
178 $ilCtrl->setParameterByClass(
"ilpagelayoutgui",
"obj_id", $this->obj->getId());
181 $this->
lng->txt(
"settings"),
182 $ilCtrl->getLinkTarget($this,
"properties")
185 $tpl->setTitle($this->layout_object->getTitle());
186 $tpl->setDescription(
"");
192 public static function getTemplateSelection(
string $module): ?
Radio
199 if (count($arr_templates) == 0) {
202 $radio =
$f->input()->field()->radio(
$lng->txt(
"cont_page_template"),
"");
205 foreach ($arr_templates as $templ) {
207 $first = $templ->getId();
209 $templ->readObject();
210 $radio = $radio->withOption($templ->getId(), $templ->getPreview(), $templ->getTitle());
212 $radio = $radio->withValue($first);
218 $this->
ctrl->redirectByClass(
"ilpagelayoutadministrationgui",
"listLayouts");
This class represents an option in a checkbox group.
static getContentStylePath(int $a_style_id, bool $add_random=true, bool $add_token=true)
get content style path static (to avoid full reading)
static getSyntaxStylePath()
Class ilPageLayoutGUI GUI class.
executeCommand()
execute command
setTabs(?ilTabsGUI $a_tabs=null)
output tabs
properties(string $a_mode="save", ?ilPropertyFormGUI $a_form=null)
Edit page layout properties.
ilPageLayout $layout_object
__construct(string $a_parent_type, int $a_id=0, int $a_old_nr=0, bool $a_prevent_get_id=false, string $a_lang="")
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static activeLayouts(int $a_module=0)
Get active layouts.
static getAvailableModules()
ilGlobalTemplateInterface $tpl
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This class represents a text area property in a property form.
This class represents a text property in a property form.
static getImagePath(string $image_name, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
setVariable(string $variable, $value='')
Sets the given variable to the given value.
parseCurrentBlock(string $block_name=self::DEFAULT_BLOCK)
Parses the given block.
setCurrentBlock(string $part=self::DEFAULT_BLOCK)
Sets the template to the given block.
addCss(string $a_css_file, string $media="screen")
Add a css file that should be included in the header.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc