57        $this->access = 
$DIC->access();
 
   59        $this->toolbar = 
$DIC->toolbar();
 
   61        $ilTabs = 
$DIC->tabs();
 
   66        $this->tabs_gui = $ilTabs;
 
   69        $this->
object = $a_parent_obj;
 
   71        include_once 
"Services/Container/classes/class.ilContainerStartObjects.php";
 
   73            $this->object->getRefId(),
 
   74            $this->object->getId()
 
   77        $this->lng->loadLanguageModule(
"crs");
 
   84        switch ($this->ctrl->getNextClass($this)) {
 
   85            case "ilcontainerstartobjectspagegui":
 
   87                $this->tabs_gui->clearTargets();
 
   88                $this->tabs_gui->setBackTarget(
 
   89                    $this->lng->txt(
"back"),
 
   90                    $this->ctrl->getLinkTarget($this, 
"listStructure")
 
   93                include_once 
"Services/Container/classes/class.ilContainerStartObjectsPage.php";
 
   97                    $new_page_object->setParentId($this->object->getId());
 
   98                    $new_page_object->setId($this->object->getId());
 
   99                    $new_page_object->createFromXML();
 
  100                    unset($new_page_object);
 
  103                $this->tpl->setVariable(
 
  104                    "LOCATION_CONTENT_STYLESHEET",
 
  106                        $this->object->getStyleSheetId(),
 
  107                        $this->object->getType()
 
  111                $this->ctrl->setReturnByClass(
"ilcontainerstartobjectspagegui", 
"edit");
 
  112                include_once 
"Services/Container/classes/class.ilContainerStartObjectsPageGUI.php";
 
  114                include_once(
"./Services/Style/Content/classes/class.ilObjStyleSheet.php");
 
  116                    $this->object->getStyleSheetId(),
 
  117                    $this->object->getType()
 
  120                $ret = $this->ctrl->forwardCommand($pgui);
 
  122                    $this->tpl->setContent(
$ret);
 
  127                $cmd = $this->ctrl->getCmd(
"listStructure");
 
  138        $ref_id = $this->
object->getRefId();
 
  139        if (!$ilAccess->checkAccess($a_cmd, 
"", $ref_id)) {
 
  141            ilUtil::redirect(
"goto.php?target=" . $this->object->getType() . 
"_" . $ref_id);
 
  149        $this->tabs_gui->addSubTab(
 
  151            $this->lng->txt(
"cntr_manage"),
 
  152            $this->ctrl->getLinkTarget($this, 
"listStructure")
 
  156        if (
$ilSetting->get(
"enable_cat_page_edit")) {
 
  157            $this->tabs_gui->addSubTab(
 
  159                $this->lng->txt(
"cntr_text_media_editor"),
 
  160                $this->ctrl->getLinkTargetByClass(
"ilContainerStartObjectsPageGUI", 
"edit")
 
  164        $this->tabs_gui->activateSubTab($a_active);
 
  174        $ilToolbar->addButton(
 
  175            $this->lng->txt(
'crs_add_starter'),
 
  176            $this->ctrl->getLinkTarget($this, 
'selectStarter')
 
  179        include_once 
'./Services/Container/classes/class.ilContainerStartObjectsTableGUI.php';
 
  181        $this->tpl->setContent(
$table->getHTML());
 
  187        if (is_array($pos)) {
 
  190            foreach (array_keys($pos) as $start_id) {
 
  192                $this->start_object->setObjectPos($start_id, $counter);
 
  195            ilUtil::sendSuccess($this->lng->txt(
'cntr_saved_sorting'), 
true);
 
  198        $this->ctrl->redirect($this, 
"listStructure");
 
  203        if (empty(
$_POST[
'starter'])) {
 
  205            $this->ctrl->redirect($this, 
"listStructure");
 
  212        include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
 
  214        $cgui->setFormAction($this->ctrl->getFormAction($this, 
"listStructure"));
 
  215        $cgui->setHeaderText($this->lng->txt(
"crs_starter_delete_sure"));
 
  216        $cgui->setCancel($this->lng->txt(
"cancel"), 
"listStructure");
 
  217        $cgui->setConfirm($this->lng->txt(
"remove"), 
"deleteStarter");
 
  220        $all = $this->start_object->getStartObjects();
 
  221        foreach (
$_POST[
'starter'] as $starter_id) {
 
  224            $icon = ilObject::_getIcon($obj_id, 
"tiny");
 
  226            $cgui->addItem(
"starter[]", $starter_id, 
$title, $icon, $alt);
 
  229        $this->tpl->setContent($cgui->getHTML());
 
  236        if (!count(
$_POST[
'starter'])) {
 
  239            foreach (
$_POST[
'starter'] as $starter_id) {
 
  240                $this->start_object->delete((
int) $starter_id);
 
  243            ilUtil::sendSuccess($this->lng->txt(
'crs_starter_deleted'), 
true);
 
  246        $this->ctrl->redirect($this, 
"listStructure");
 
  254        include_once 
'./Services/Container/classes/class.ilContainerStartObjectsTableGUI.php';
 
  256        $this->tpl->setContent(
$table->getHTML());
 
  263        if (empty(
$_POST[
'starter'])) {
 
  265            $this->ctrl->redirect($this, 
"selectStarter");
 
  269        foreach (
$_POST[
'starter'] as $item_ref_id) {
 
  270            if (!$this->start_object->exists($item_ref_id)) {
 
  272                $this->start_object->add($item_ref_id);
 
  276            ilUtil::sendSuccess($this->lng->txt(
'crs_added_starters'), 
true);
 
  277            $this->ctrl->redirect($this, 
"listStructure");
 
  280            $this->ctrl->redirect($this, 
"selectStarter");
 
An exception for terminatinating execution or to throw for unit testing.
Confirmation screen class.
Class ilContainerStartObjectsGUI.
__construct(ilObject $a_parent_obj)
setTabs($a_active="manage")
Container start objects page GUI class.
Container start objects page object.
ilContainerStartObjectsTableGUI
static getEffectiveContentStyleId($a_style_id, $a_type="")
Get effective Style Id.
static getContentStylePath($a_style_id, $add_random=true)
get content style path
Class ilObject Basic functions for all objects.
static _lookupObjId($a_id)
static _lookupTitle($a_id)
lookup object title
static _lookupType($a_id, $a_reference=false)
lookup object type
static _exists($a_parent_type, $a_id, $a_lang="", $a_no_cache=false)
Checks whether page exists.
static redirect($a_script)
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
if(empty($password)) $table