4 include_once(
"./Services/COPage/classes/class.ilPageObjectGUI.php");
5 include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004Page.php");
35 public function __construct($a_parent_type, $a_id = 0, $a_old_nr = 0, $a_prevent_get_id =
false, $a_lang =
"")
39 $this->tpl = $DIC[
"tpl"];
40 $this->ctrl = $DIC->ctrl();
41 $this->tabs = $DIC->tabs();
42 $this->lng = $DIC->language();
49 include_once(
"./Services/COPage/Layout/classes/class.ilPageLayout.php");
52 $this->layout_object->readObject();
55 include_once(
"./Services/Style/Content/classes/class.ilObjStyleSheet.php");
56 $tpl->setCurrentBlock(
"ContentStyle");
58 "LOCATION_CONTENT_STYLESHEET",
61 $tpl->parseCurrentBlock();
68 $this->layout_object->getStyleId()
80 $next_class = $this->ctrl->getNextClass($this);
81 $cmd = $this->ctrl->getCmd();
83 switch ($next_class) {
85 return parent::executeCommand();
88 case "ilpageobjectgui":
89 die(
"ilPageLayoutGUI forward to ilpageobjectgui error.");
93 $html = parent::executeCommand();
112 $ilTabs->setTabActive(
'properties');
118 $this->tpl->setContent($a_form->getHTML());
127 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
129 $form_gui->setFormAction($ilCtrl->getFormAction($this));
130 $form_gui->setTitle(
$lng->txt(
"cont_ed_pglprop"));
134 $title_input->setSize(50);
135 $title_input->setMaxLength(128);
136 $title_input->setValue($this->layout_object->title);
137 $title_input->setTitle(
$lng->txt(
"title"));
138 $title_input->setRequired(
true);
142 $desc_input->
setValue($this->layout_object->description);
143 $desc_input->setRows(3);
144 $desc_input->setCols(37);
145 $desc_input->setTitle(
$lng->txt(
"description"));
146 $desc_input->setRequired(
false);
151 $mods->
setValue($this->layout_object->getModules());
154 $mods->addOption($mod);
157 $form_gui->addItem($title_input);
158 $form_gui->addItem($desc_input);
159 $form_gui->addItem($mods);
162 $fixed_style =
$ilSetting->get(
"fixed_content_style_id");
163 $style_id = $this->layout_object->getStyleId();
165 if ($fixed_style > 0) {
168 $this->lng->txt(
"global_fixed") .
")");
169 $form_gui->addItem($st);
171 include_once(
"./Services/Style/Content/classes/class.ilObjStyleSheet.php");
173 $st_styles[0] = $this->lng->txt(
"default");
176 $style_sel->setOptions($st_styles);
177 $style_sel->setValue($style_id);
178 $form_gui->addItem($style_sel);
181 $form_gui->addCommandButton(
"updateProperties",
$lng->txt($a_mode));
194 if (!$form->checkInput()) {
195 $form->setValuesByPost();
199 $this->layout_object->setTitle($form->getInput(
'pgl_title'));
200 $this->layout_object->setDescription($form->getInput(
'pgl_desc'));
201 $this->layout_object->setStyleId($form->getInput(
'style_id'));
202 $this->layout_object->setModules($form->getInput(
'module'));
203 $this->layout_object->update();
219 $ilCtrl->setParameterByClass(
"ilpagelayoutgui",
"obj_id", $this->obj->getId());
222 $ilCtrl->getLinkTarget($this,
"properties"),
223 array(
"properties",
"",
""),
228 $tpl->setTitle($this->layout_object->getTitle());
229 $tpl->setDescription(
"");
238 public static function getTemplateSelection(
string $module)
243 $lng = $DIC->language();
245 if (count($arr_templates) == 0) {
248 $radio =
$f->input()->field()->radio(
$lng->txt(
"cont_page_template"),
"");
251 foreach ($arr_templates as $templ) {
253 $first = (int) $templ->getId();
255 $templ->readObject();
256 $radio = $radio->withOption($templ->getId(), $templ->getPreview(), $templ->getTitle());
258 $radio = $radio->withValue((
int) $first);
static getContentStylePath($a_style_id, $add_random=true, $add_token=true)
get content style path
__construct($a_parent_type, $a_id=0, $a_old_nr=0, $a_prevent_get_id=false, $a_lang="")
Constructor.
static getPlaceHolderStylePath()
get placeholder style path (for Page Layouts)
setTabs($a_tabs="")
output tabs
setValue($a_value)
Set Value.
This class represents an option in a checkbox group.
Class ilPageLayoutGUI GUI class.
setValue($a_value)
Set Value.
static _lookupTitle($a_id)
lookup object title
static _getStandardStyles( $a_exclude_default_style=false, $a_include_deactivated=false, $a_scope=0)
Get standard styles.
executeCommand()
execute command
updateProperties()
Update properties.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
properties($a_mode="save", $a_form=null)
Edit page layout properties.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
static getEffectiveContentStyleId($a_style_id, $a_type="")
Get effective Style Id.
static getAvailableModules()
static getSyntaxStylePath()
get syntax style path
setStyleId($a_styleid)
Set Style Id.
This class represents a non editable value in a property form.
__construct(Container $dic, ilPlugin $plugin)
This class represents a text area property in a property form.
static activeLayouts($a_special_page=false, $a_module=null)
Get active layouts.