46         $this->
access = $DIC->access();
    48         $this->
toolbar = $DIC->toolbar();
    49         $ilCtrl = $DIC->ctrl();
    50         $ilTabs = $DIC->tabs();
    51         $lng = $DIC->language();
    54         $this->
ctrl = $ilCtrl;
    55         $this->tabs_gui = $ilTabs;
    58         $this->
object = $a_parent_obj;
    62             $this->
object->getId()
    65         $this->request = $DIC->container()
    70         $this->
lng->loadLanguageModule(
"crs");
    71         $cs = $DIC->contentStyle();
    72         $this->content_style_domain = $cs->domain()->styleForRefId($a_parent_obj->
getRefId());
    73         $this->content_style_gui = $cs->gui();
    78         switch ($this->
ctrl->getNextClass($this)) {
    79             case "ilcontainerstartobjectspagegui":
    81                 $this->tabs_gui->clearTargets();
    82                 $this->tabs_gui->setBackTarget(
    83                     $this->
lng->txt(
"back"),
    84                     $this->
ctrl->getLinkTarget($this, 
"listStructure")
    90                     $new_page_object->setParentId($this->
object->getId());
    91                     $new_page_object->setId($this->
object->getId());
    92                     $new_page_object->createFromXML();
    93                     unset($new_page_object);
    96                 $this->content_style_gui->addCss(
   101                 $this->
ctrl->setReturnByClass(
"ilcontainerstartobjectspagegui", 
"edit");
   104                     $this->content_style_domain->getEffectiveStyleId()
   107                 $ret = $this->
ctrl->forwardCommand($pgui);
   109                     $this->tpl->setContent($ret);
   114                 $cmd = $this->
ctrl->getCmd(
"listStructure");
   125         $ref_id = $this->
object->getRefId();
   126         if (!$ilAccess->checkAccess($a_cmd, 
"", 
$ref_id)) {
   127             $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"permission_denied"), 
true);
   132     public function setTabs(
string $a_active = 
"manage"): void
   136         $this->tabs_gui->addSubTab(
   138             $this->
lng->txt(
"cntr_manage"),
   139             $this->
ctrl->getLinkTarget($this, 
"listStructure")
   142         $this->tabs_gui->activateSubTab($a_active);
   153         $ilToolbar->addButton(
   154             $this->
lng->txt(
'crs_add_starter'),
   155             $this->
ctrl->getLinkTarget($this, 
'selectStarter')
   159         if (
$ilSetting->get(
"enable_cat_page_edit")) {
   160             $ilToolbar->addButton(
   161                 $this->
lng->txt(
"cntr_text_media_editor"),
   162                 $this->
ctrl->getLinkTargetByClass(
"ilContainerStartObjectsPageGUI", 
"edit")
   167         $this->tpl->setContent($table->getHTML());
   172         $pos = $this->request->getStartObjPositions();
   173         if (is_array($pos)) {
   176             foreach (array_keys($pos) as $start_id) {
   178                 $this->start_object->setObjectPos($start_id, $counter);
   181             $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'cntr_saved_sorting'), 
true);
   184         $this->
ctrl->redirect($this, 
"listStructure");
   189         if (count($this->request->getStartObjIds()) === 0) {
   190             $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'select_one'), 
true);
   191             $this->
ctrl->redirect($this, 
"listStructure");
   199         $cgui->setFormAction($this->
ctrl->getFormAction($this, 
"listStructure"));
   200         $cgui->setHeaderText($this->
lng->txt(
"crs_starter_delete_sure"));
   201         $cgui->setCancel($this->
lng->txt(
"cancel"), 
"listStructure");
   202         $cgui->setConfirm($this->
lng->txt(
"remove"), 
"deleteStarter");
   205         $all = $this->start_object->getStartObjects();
   206         foreach ($this->request->getStartObjIds() as $starter_id) {
   211             $cgui->addItem(
"starter[]", (
string) $starter_id, $title, $icon, $alt);
   214         $this->tpl->setContent($cgui->getHTML());
   221         if (count($this->request->getStartObjIds()) === 0) {
   222             $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'select_one'), 
true);
   224             foreach ($this->request->getStartObjIds() as $starter_id) {
   225                 $this->start_object->delete((
int) $starter_id);
   228             $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'crs_starter_deleted'), 
true);
   231         $this->
ctrl->redirect($this, 
"listStructure");
   240         $this->tpl->setContent($table->getHTML());
   247         if (count($this->request->getStartObjIds()) === 0) {
   248             $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'select_one'), 
true);
   249             $this->
ctrl->redirect($this, 
"selectStarter");
   253         foreach ($this->request->getStartObjIds() as $item_ref_id) {
   254             if (!$this->start_object->exists($item_ref_id)) {
   256                 $this->start_object->add($item_ref_id);
   260             $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'crs_added_starters'), 
true);
   261             $this->
ctrl->redirect($this, 
"listStructure");
   263             $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'crs_starters_already_assigned'), 
true);
   264             $this->
ctrl->redirect($this, 
"selectStarter");
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
static _getIcon(int $obj_id=0, string $size="big", string $type="", bool $offline=false)
Get icon for repository item. 
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
ILIAS Style Content GUIService $content_style_gui
 
ILIAS Style Content Object ObjectFacade $content_style_domain
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
setStyleId(int $a_styleid)
 
__construct(ilObject $a_parent_obj)
 
static _lookupObjId(int $ref_id)
 
ilGlobalTemplateInterface $tpl
 
static _lookupTitle(int $obj_id)
 
static _exists(string $a_parent_type, int $a_id, string $a_lang="", bool $a_no_cache=false)
Checks whether page exists. 
 
checkPermission(string $a_cmd)
 
static redirect(string $a_script)
 
StandardGUIRequest $request
 
ilContainerStartObjects $start_object
 
setTabs(string $a_active="manage")
 
static _lookupType(int $id, bool $reference=false)
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
Class ilContainerStartObjectsGUI.