36 string $a_parent_type,
39 bool $a_prevent_get_id =
false,
44 $this->tpl =
$DIC[
"tpl"];
45 $this->
ctrl = $DIC->ctrl();
46 $this->
tabs = $DIC->tabs();
47 $this->
lng = $DIC->language();
55 $this->layout_object->readObject();
60 "LOCATION_CONTENT_STYLESHEET",
72 $next_class = $this->
ctrl->getNextClass($this);
74 switch ($next_class) {
76 return parent::executeCommand();
79 $html = parent::executeCommand();
93 string $a_mode =
"save",
96 $ilTabs = $this->
tabs;
98 $ilTabs->setTabActive(
'properties');
103 $this->tpl->setContent($a_form->getHTML());
108 $ilCtrl = $this->ctrl;
113 $form_gui->setFormAction($ilCtrl->getFormAction($this));
114 $form_gui->setTitle(
$lng->txt(
"cont_ed_pglprop"));
118 $title_input->setSize(50);
119 $title_input->setMaxLength(128);
120 $title_input->setValue($this->layout_object->title);
121 $title_input->setTitle(
$lng->txt(
"title"));
122 $title_input->setRequired(
true);
126 $desc_input->setValue($this->layout_object->description);
127 $desc_input->setRows(3);
128 $desc_input->setCols(37);
129 $desc_input->setTitle(
$lng->txt(
"description"));
130 $desc_input->setRequired(
false);
135 $mods->setValue($this->layout_object->getModules());
138 $mods->addOption($mod);
141 $form_gui->addItem($title_input);
142 $form_gui->addItem($desc_input);
143 $form_gui->addItem($mods);
145 $form_gui->addCommandButton(
"updateProperties",
$lng->txt($a_mode));
154 $form = $this->initForm(
"save");
155 if (!$form->checkInput()) {
156 $form->setValuesByPost();
157 $this->properties(
"save", $form);
161 $this->layout_object->setTitle($form->getInput(
'pgl_title'));
162 $this->layout_object->setDescription($form->getInput(
'pgl_desc'));
163 $this->layout_object->setModules($form->getInput(
'module'));
164 $this->layout_object->update();
166 $this->tpl->setOnScreenMessage(
'info',
$lng->txt(
"saved_successfully"));
175 $ilTabs = $this->tabs;
176 $ilCtrl = $this->ctrl;
179 $ilCtrl->setParameterByClass(
"ilpagelayoutgui",
"obj_id", $this->obj->getId());
182 $this->
lng->txt(
"settings"),
183 $ilCtrl->getLinkTarget($this,
"properties")
186 $tpl->setTitle($this->layout_object->getTitle());
187 $tpl->setDescription(
"");
193 public static function getTemplateSelection(
string $module,
bool $include_none =
false): ?
Radio
200 if (count($arr_templates) == 0) {
203 $radio =
$f->input()->field()->radio(
$lng->txt(
"cont_page_template"),
"");
206 $radio = $radio->withOption(
"0",
$lng->txt(
"none"));
209 foreach ($arr_templates as $templ) {
210 if ($first ==
"0" && !$include_none) {
211 $first = $templ->getId();
213 $templ->readObject();
214 $radio = $radio->withOption($templ->getId(), $templ->getPreview(), $templ->getTitle());
216 $radio = $radio->withValue($first);
227 if (count($arr_templates) == 0) {
230 $form = $form->
radio(
"template_id",
$lng->txt(
"cont_page_template"));
231 $radio =
$f->input()->field()->radio(
$lng->txt(
"cont_page_template"),
"");
237 foreach ($arr_templates as $templ) {
238 if ($first ==
"0" && !$include_none) {
239 $first = $templ->getId();
241 $templ->readObject();
242 $form = $form->
radioOption($templ->getId(), $templ->getPreview(), $templ->getTitle());
249 $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