23 $this->tabs_gui = $ilTabs;
26 $this->
object = $a_parent_obj;
28 include_once
"Services/Container/classes/class.ilContainerStartObjects.php";
30 $this->
object->getId());
32 $this->lng->loadLanguageModule(
"crs");
39 switch($this->ctrl->getNextClass($this))
41 case "ilcontainerstartobjectspagegui":
43 $this->tabs_gui->clearTargets();
44 $this->tabs_gui->setBackTarget($this->lng->txt(
"back"),
45 $this->ctrl->getLinkTarget($this,
"listStructure"));
47 include_once
"Services/Container/classes/class.ilContainerStartObjectsPage.php";
52 $new_page_object->setParentId($this->object->getId());
53 $new_page_object->setId($this->object->getId());
54 $new_page_object->createFromXML();
55 unset($new_page_object);
58 $this->ctrl->setReturnByClass(
"ilcontainerstartobjectspagegui",
"edit");
59 include_once
"Services/Container/classes/class.ilContainerStartObjectsPageGUI.php";
63 include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
66 $ret = $this->ctrl->forwardCommand($pgui);
69 $this->tpl->setContent(
$ret);
74 $cmd = $this->ctrl->getCmd(
"listStructure");
85 $ref_id = $this->
object->getRefId();
86 if(!$ilAccess->checkAccess($a_cmd,
"",
$ref_id))
93 public function setTabs($a_active =
"manage")
97 $this->tabs_gui->addSubTab(
"manage",
98 $this->lng->txt(
"cntr_manage"),
99 $this->ctrl->getLinkTarget($this,
"listStructure"));
102 if ($ilSetting->get(
"enable_cat_page_edit"))
104 $this->tabs_gui->addSubTab(
"page_editor",
105 $this->lng->txt(
"cntr_text_media_editor"),
106 $this->ctrl->getLinkTargetByClass(
"ilContainerStartObjectsPageGUI",
"edit"));
109 $this->tabs_gui->activateSubTab($a_active);
119 $ilToolbar->addButton($this->lng->txt(
'crs_add_starter'),
120 $this->ctrl->getLinkTarget($this,
'selectStarter'));
122 include_once
'./Services/Container/classes/class.ilContainerStartObjectsTableGUI.php';
124 $this->tpl->setContent($table->getHTML());
134 foreach(array_keys($pos) as $start_id)
137 $this->start_object->setObjectPos($start_id, $counter);
143 $this->ctrl->redirect($this,
"listStructure");
148 if(!count(
$_POST[
'starter']))
151 $this->ctrl->redirect($this,
"listStructure");
158 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
160 $cgui->setFormAction($this->ctrl->getFormAction($this,
"listStructure"));
161 $cgui->setHeaderText($this->lng->txt(
"crs_starter_delete_sure"));
162 $cgui->setCancel($this->lng->txt(
"cancel"),
"listStructure");
163 $cgui->setConfirm($this->lng->txt(
"delete"),
"deleteStarter");
166 $all = $this->start_object->getStartObjects();
167 foreach(
$_POST[
'starter'] as $starter_id)
173 $cgui->addItem(
"starter[]", $starter_id, $title, $icon, $alt);
176 $this->tpl->setContent($cgui->getHTML());
183 if(!count(
$_POST[
'starter']))
189 foreach(
$_POST[
'starter'] as $starter_id)
191 $this->start_object->delete((
int)$starter_id);
197 $this->ctrl->redirect($this,
"listStructure");
205 include_once
'./Services/Container/classes/class.ilContainerStartObjectsTableGUI.php';
207 $this->tpl->setContent($table->getHTML());
214 if(!count(
$_POST[
'starter']))
217 $this->ctrl->redirect($this,
"selectStarter");
221 foreach(
$_POST[
'starter'] as $item_ref_id)
223 if(!$this->start_object->exists($item_ref_id))
226 $this->start_object->add($item_ref_id);
232 $this->ctrl->redirect($this,
"listStructure");
237 $this->ctrl->redirect($this,
"selectStarter");