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->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
60 $this->
object->getStyleSheetId(), $this->
object->getType())));
62 $this->ctrl->setReturnByClass(
"ilcontainerstartobjectspagegui",
"edit");
63 include_once
"Services/Container/classes/class.ilContainerStartObjectsPageGUI.php";
65 include_once(
"./Services/Style/Content/classes/class.ilObjStyleSheet.php");
67 $this->
object->getStyleSheetId(), $this->
object->getType()));
69 $ret = $this->ctrl->forwardCommand($pgui);
72 $this->tpl->setContent(
$ret);
77 $cmd = $this->ctrl->getCmd(
"listStructure");
88 $ref_id = $this->
object->getRefId();
89 if(!$ilAccess->checkAccess($a_cmd,
"",
$ref_id))
96 public function setTabs($a_active =
"manage")
100 $this->tabs_gui->addSubTab(
"manage",
101 $this->lng->txt(
"cntr_manage"),
102 $this->ctrl->getLinkTarget($this,
"listStructure"));
105 if ($ilSetting->get(
"enable_cat_page_edit"))
107 $this->tabs_gui->addSubTab(
"page_editor",
108 $this->lng->txt(
"cntr_text_media_editor"),
109 $this->ctrl->getLinkTargetByClass(
"ilContainerStartObjectsPageGUI",
"edit"));
112 $this->tabs_gui->activateSubTab($a_active);
122 $ilToolbar->addButton($this->lng->txt(
'crs_add_starter'),
123 $this->ctrl->getLinkTarget($this,
'selectStarter'));
125 include_once
'./Services/Container/classes/class.ilContainerStartObjectsTableGUI.php';
127 $this->tpl->setContent($table->getHTML());
137 foreach(array_keys($pos) as $start_id)
140 $this->start_object->setObjectPos($start_id,
$counter);
146 $this->ctrl->redirect($this,
"listStructure");
151 if(!count(
$_POST[
'starter']))
154 $this->ctrl->redirect($this,
"listStructure");
161 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
163 $cgui->setFormAction($this->ctrl->getFormAction($this,
"listStructure"));
164 $cgui->setHeaderText($this->lng->txt(
"crs_starter_delete_sure"));
165 $cgui->setCancel($this->lng->txt(
"cancel"),
"listStructure");
166 $cgui->setConfirm($this->lng->txt(
"remove"),
"deleteStarter");
169 $all = $this->start_object->getStartObjects();
170 foreach(
$_POST[
'starter'] as $starter_id)
176 $cgui->addItem(
"starter[]", $starter_id,
$title, $icon, $alt);
179 $this->tpl->setContent($cgui->getHTML());
186 if(!count(
$_POST[
'starter']))
192 foreach(
$_POST[
'starter'] as $starter_id)
194 $this->start_object->delete((
int)$starter_id);
200 $this->ctrl->redirect($this,
"listStructure");
208 include_once
'./Services/Container/classes/class.ilContainerStartObjectsTableGUI.php';
210 $this->tpl->setContent($table->getHTML());
217 if(!count(
$_POST[
'starter']))
220 $this->ctrl->redirect($this,
"selectStarter");
224 foreach(
$_POST[
'starter'] as $item_ref_id)
226 if(!$this->start_object->exists($item_ref_id))
229 $this->start_object->add($item_ref_id);
235 $this->ctrl->redirect($this,
"listStructure");
240 $this->ctrl->redirect($this,
"selectStarter");
setTabs($a_active="manage")
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static _exists($a_parent_type, $a_id, $a_lang="", $a_no_cache=false)
Checks whether page exists.
static _getIcon($a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
Get icon for repository item.
Container start objects page GUI class.
Container start objects page object.
Class ilObject Basic functions for all objects.
static _lookupTitle($a_id)
lookup object title
__construct(ilObject $a_parent_obj)
static _lookupObjId($a_id)
static getEffectiveContentStyleId($a_style_id, $a_type="")
Get effective Style Id.
static _lookupType($a_id, $a_reference=false)
lookup object type
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static getContentStylePath($a_style_id)
get content style path
Create new PHPExcel object
obj_idprivate
static redirect($a_script)
http redirect to other script
ilContainerStartObjectsTableGUI
Class ilContainerStartObjectsGUI.
Confirmation screen class.