Class ilContainerStartObjectsGUI.
More...
◆ __construct()
ilContainerStartObjectsGUI::__construct |
( |
ilObject |
$a_parent_obj | ) |
|
Definition at line 18 of file class.ilContainerStartObjectsGUI.php.
References $ilCtrl, $lng, and $tpl.
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");
◆ addStarterObject()
ilContainerStartObjectsGUI::addStarterObject |
( |
| ) |
|
|
protected |
Definition at line 210 of file class.ilContainerStartObjectsGUI.php.
References $_POST, checkPermission(), ilUtil\sendFailure(), and ilUtil\sendSuccess().
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");
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
◆ askDeleteStarterObject()
ilContainerStartObjectsGUI::askDeleteStarterObject |
( |
| ) |
|
|
protected |
Definition at line 146 of file class.ilContainerStartObjectsGUI.php.
References $_POST, ilObject\_getIcon(), ilObject\_lookupObjId(), ilObject\_lookupTitle(), ilObject\_lookupType(), checkPermission(), ilUtil\sendFailure(), and setTabs().
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());
setTabs($a_active="manage")
static _getIcon($a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
Get icon for repository item.
static _lookupTitle($a_id)
lookup object title
static _lookupObjId($a_id)
static _lookupType($a_id, $a_reference=false)
lookup object type
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
Confirmation screen class.
◆ checkPermission()
ilContainerStartObjectsGUI::checkPermission |
( |
|
$a_cmd | ) |
|
|
protected |
Definition at line 81 of file class.ilContainerStartObjectsGUI.php.
References $ref_id, ilUtil\redirect(), and ilUtil\sendFailure().
Referenced by addStarterObject(), askDeleteStarterObject(), deleteStarterObject(), executeCommand(), listStructureObject(), and selectStarterObject().
85 $ref_id = $this->
object->getRefId();
86 if(!$ilAccess->checkAccess($a_cmd,
"",
$ref_id))
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static redirect($a_script)
http redirect to other script
◆ deleteStarterObject()
ilContainerStartObjectsGUI::deleteStarterObject |
( |
| ) |
|
|
protected |
◆ executeCommand()
ilContainerStartObjectsGUI::executeCommand |
( |
| ) |
|
Definition at line 35 of file class.ilContainerStartObjectsGUI.php.
References $cmd, $ret, ilPageObject\_exists(), checkPermission(), and ilObjStyleSheet\getEffectiveContentStyleId().
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");
Container start objects page GUI class.
Container start objects page object.
static _exists($a_parent_type, $a_id, $a_lang="")
Checks whether page exists.
static getEffectiveContentStyleId($a_style_id, $a_type="")
Get effective Style Id.
◆ listStructureObject()
ilContainerStartObjectsGUI::listStructureObject |
( |
| ) |
|
|
protected |
Definition at line 112 of file class.ilContainerStartObjectsGUI.php.
References checkPermission(), and setTabs().
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());
setTabs($a_active="manage")
ilContainerStartObjectsTableGUI
◆ saveSortingObject()
ilContainerStartObjectsGUI::saveSortingObject |
( |
| ) |
|
|
protected |
Definition at line 127 of file class.ilContainerStartObjectsGUI.php.
References $_POST, and ilUtil\sendSuccess().
134 foreach(array_keys($pos) as $start_id)
137 $this->start_object->setObjectPos($start_id, $counter);
143 $this->ctrl->redirect($this,
"listStructure");
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
◆ selectStarterObject()
ilContainerStartObjectsGUI::selectStarterObject |
( |
| ) |
|
|
protected |
◆ setTabs()
ilContainerStartObjectsGUI::setTabs |
( |
|
$a_active = "manage" | ) |
|
Definition at line 93 of file class.ilContainerStartObjectsGUI.php.
References $ilSetting.
Referenced by askDeleteStarterObject(), listStructureObject(), and selectStarterObject().
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);
◆ $object
ilContainerStartObjectsGUI::$object |
|
protected |
◆ $start_object
ilContainerStartObjectsGUI::$start_object |
|
protected |
The documentation for this class was generated from the following file: