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/classes/class.ilObjStyleSheet.php");
67 $this->object->getStyleSheetId(), $this->
object->getType()));
74 $ret = $this->ctrl->forwardCommand($pgui);
77 $this->tpl->setContent(
$ret);
82 $cmd = $this->ctrl->getCmd(
"listStructure");
93 $ref_id = $this->
object->getRefId();
94 if(!$ilAccess->checkAccess($a_cmd,
"",
$ref_id))
105 $this->tabs_gui->addSubTab(
"manage",
106 $this->lng->txt(
"cntr_manage"),
107 $this->ctrl->getLinkTarget($this,
"listStructure"));
110 if ($ilSetting->get(
"enable_cat_page_edit"))
112 $this->tabs_gui->addSubTab(
"page_editor",
113 $this->lng->txt(
"cntr_text_media_editor"),
114 $this->ctrl->getLinkTargetByClass(
"ilContainerStartObjectsPageGUI",
"edit"));
117 $this->tabs_gui->activateSubTab($a_active);
127 $ilToolbar->addButton($this->lng->txt(
'crs_add_starter'),
128 $this->ctrl->getLinkTarget($this,
'selectStarter'));
130 include_once
'./Services/Container/classes/class.ilContainerStartObjectsTableGUI.php';
132 $this->tpl->setContent($table->getHTML());
142 foreach(array_keys($pos) as $start_id)
145 $this->start_object->setObjectPos($start_id, $counter);
151 $this->ctrl->redirect($this,
"listStructure");
156 if(!count(
$_POST[
'starter']))
159 $this->ctrl->redirect($this,
"listStructure");
166 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
168 $cgui->setFormAction($this->ctrl->getFormAction($this,
"listStructure"));
169 $cgui->setHeaderText($this->lng->txt(
"crs_starter_delete_sure"));
170 $cgui->setCancel($this->lng->txt(
"cancel"),
"listStructure");
171 $cgui->setConfirm($this->lng->txt(
"remove"),
"deleteStarter");
174 $all = $this->start_object->getStartObjects();
175 foreach(
$_POST[
'starter'] as $starter_id)
181 $cgui->addItem(
"starter[]", $starter_id, $title, $icon, $alt);
184 $this->tpl->setContent($cgui->getHTML());
191 if(!count(
$_POST[
'starter']))
197 foreach(
$_POST[
'starter'] as $starter_id)
199 $this->start_object->delete((
int)$starter_id);
205 $this->ctrl->redirect($this,
"listStructure");
213 include_once
'./Services/Container/classes/class.ilContainerStartObjectsTableGUI.php';
215 $this->tpl->setContent($table->getHTML());
222 if(!count(
$_POST[
'starter']))
225 $this->ctrl->redirect($this,
"selectStarter");
229 foreach(
$_POST[
'starter'] as $item_ref_id)
231 if(!$this->start_object->exists($item_ref_id))
234 $this->start_object->add($item_ref_id);
240 $this->ctrl->redirect($this,
"listStructure");
245 $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.
getContentStylePath($a_style_id)
get content style path
static redirect($a_script)
http redirect to other script
ilContainerStartObjectsTableGUI
Class ilContainerStartObjectsGUI.
Confirmation screen class.