28 protected \ILIAS\LearningModule\InternalDomainService
$domain;
29 protected \ILIAS\LearningModule\InternalGUIService
$gui;
43 $this->
user = $DIC->user();
44 $this->
ctrl = $DIC->ctrl();
45 $this->
lng = $DIC->language();
46 $this->
tabs = $DIC->tabs();
47 $this->log = $DIC[
"ilLog"];
48 $this->tpl = $DIC->ui()->mainTemplate();
50 $this->tree = $a_tree;
51 $this->gui = $DIC->learningModule()->internal()->gui();
52 $this->domain = $DIC->learningModule()->internal()->domain();
58 $this->obj = $a_st_object;
68 $next_class = $this->
ctrl->getNextClass($this);
69 $cmd = $this->
ctrl->getCmd();
71 switch ($next_class) {
72 case 'ilobjectmetadatagui':
76 $md_gui =
new ilObjectMetaDataGUI($this->content_object, $this->obj->getType(), $this->obj->getId());
77 $md_gui->
addMDObserver($this->obj,
'MDUpdateListener',
'General');
78 $md_gui->addMDObserver($this->obj,
'MDUpdateListener',
'Educational');
79 $this->
ctrl->forwardCommand($md_gui);
82 case "ilconditionhandlergui":
87 $this->
ctrl->forwardCommand($this->condHI);
88 $ilTabs->setTabActive(
'preconditions');
91 case strtolower(EditSubObjectsGUI::class):
93 $this->
tabs->activateTab(
"sub_pages");
94 if ($this->request->getSubType() ===
"pg") {
96 $table_title = $this->
lng->txt(
"cont_pages");
99 $table_title = $this->
lng->txt(
"cont_subchapters");
101 $gui = $this->gui->editing()->editSubObjectsGUI(
102 $this->request->getSubType(),
106 $this->
ctrl->forwardCommand($gui);
110 if ($cmd ==
'listConditions') {
113 $this->condHI->executeCommand();
114 } elseif (($cmd ==
"create") && ($this->requested_new_type ==
"pg")) {
117 $pg_gui->executeCommand();
127 if ($this->requested_obj_id != 0) {
140 $this->
ctrl->redirectByClass(EditSubObjectsGUI::class,
"editPages");
147 $this->condHI->setBackButtons(array());
148 $this->condHI->setAutomaticValidation(
false);
149 $this->condHI->setTargetType(
"st");
150 $this->condHI->setTargetRefId($this->content_object->getRefId());
151 $this->condHI->setTargetId($this->obj->getId());
152 $this->condHI->setTargetTitle($this->obj->getTitle());
161 if ($this->requested_obj_id != 0) {
162 if ($this->requested_new_type ==
"pg") {
163 $this->
ctrl->redirect($this,
"view");
165 $this->
ctrl->redirect($this,
"subchap");
176 $this->
ctrl->setParameterByClass(static::class,
"sub_type",
"pg");
180 $this->
ctrl->getLinkTargetByClass(EditSubObjectsGUI::class)
187 $this->
ctrl->getLinkTarget($this,
'listConditions')
191 $mdgui =
new ilObjectMetaDataGUI($this->content_object, $this->obj->getType(), $this->obj->getId());
192 $mdtab = $mdgui->
getTab();
202 $this->tpl->setTitle(
203 $this->
lng->txt($this->obj->getType()) .
": " . $this->obj->getTitle()
207 $ilTabs->addNonTabbedLink(
209 $lng->
txt(
"cont_presentation_view"),
210 ILIAS_HTTP_PATH .
"/goto.php?target=st_" . $this->obj->getId()
220 $this->
ctrl->setParameterByClass(static::class,
"sub_type",
"pg");
224 $this->
ctrl->getLinkTargetByClass(EditSubObjectsGUI::class)
228 $this->
ctrl->setParameterByClass(static::class,
"sub_type",
"st");
232 $this->
ctrl->getLinkTargetByClass(EditSubObjectsGUI::class)
234 $ilTabs->activateSubTab($active);
242 int $a_target_ref_id = 0
245 $main_tpl = $DIC->ui()->mainTemplate();
247 $lng = $DIC->language();
248 $ilAccess = $DIC->access();
249 $ctrl = $DIC->ctrl();
258 if (in_array($a_target_ref_id, $ref_ids)) {
259 $ref_ids = array_merge(array($a_target_ref_id), $ref_ids);
263 foreach ($ref_ids as
$ref_id) {
265 if ($ilAccess->checkAccess(
"read",
"", $ref_id)) {
273 $main_tpl->setOnScreenMessage(
'failure', sprintf(
274 $lng->
txt(
"msg_no_perm_read_item"),
297 $ids = $this->request->getIds();
298 if (count($ids) == 0) {
299 $this->tpl->setOnScreenMessage(
'failure',
$lng->
txt(
"no_checkbox"),
true);
300 $ilCtrl->redirect($this,
"showHierarchy");
318 $ids = $this->request->getIds();
319 foreach ($ids as
$id) {
322 $this->
form->addItem($hi);
327 $this->content_object->getLayout()
330 $this->
form->addItem($layout);
332 $this->
form->addCommandButton(
"savePageLayout",
$lng->
txt(
"save"));
333 $this->
form->addCommandButton(
"showHierarchy",
$lng->
txt(
"cancel"));
335 $this->
form->setTitle(
$lng->
txt(
"cont_set_layout"));
336 $this->
form->setFormAction($ilCtrl->getFormAction($this));
347 $ids = $this->request->getIds();
348 $layout = $this->request->getLayout();
349 foreach ($ids as
$id) {
353 $this->content_object
356 $this->tpl->setOnScreenMessage(
'success',
$lng->
txt(
"msg_obj_modified"),
true);
357 $ilCtrl->redirect($this,
"showHierarchy");
365 $ilCtrl->redirect($this,
"showHierarchy");
372 $ilCtrl->
setParameter($this,
"transl", $this->requested_totransl);
373 $ilCtrl->redirect($this,
"showHierarchy");
initConditionHandlerInterface()
static getLayoutOption(string $a_txt, string $a_var, string $a_def_option="")
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
initSetPageLayoutForm()
Init set page layout form.
ilGlobalTemplateInterface $tpl
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
static _getAllReferences(int $id)
get all reference ids for object ID
static _goto(string $a_target, int $a_target_ref_id=0)
ilStructureObjectGUI: ilConditionHandlerGUI, ilObjectMetaDataGUI ilStructureObjectGUI: ILIAS ...
setContent(string $a_html)
Sets content for standard template.
setParameterByClass(string $a_class, string $a_parameter, $a_value)
redirectByClass( $a_class, ?string $a_cmd=null, ?string $a_anchor=null, bool $is_async=false)
cancel()
cancel creation of new page or chapter
Base class for ilStructureObjects and ilPageObjects (see ILIAS DTD)
setStructureObject(ilStructureObject $a_st_object)
setPageLayout()
Set layout for multipl pages.
__construct(ilObjLearningModule $a_content_obj, ilLMTree $a_tree)
ilConditionHandlerGUI $condHI
static _lookupTitle(int $obj_id)
static writeLayout(int $a_obj_id, string $a_layout, ?ilObjLearningModule $a_lm=null)
Write layout setting.
static getImagePath(string $image_name, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
ILIAS LearningModule InternalGUIService $gui
ilObjLearningModule $content_object
User Interface for Learning Module Page Objects Editing.
savePageLayout()
Save page layout.
form( $class_path, string $cmd, string $submit_caption="")
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
__construct(Container $dic, ilPlugin $plugin)
static _lookupContObjID(int $a_id)
get learning module id for lm object
setParameter(object $a_gui_obj, string $a_parameter, $a_value)
ILIAS LearningModule InternalDomainService $domain
static _gotoRepositoryRoot(bool $raise_error=false)
Goto repository root.