ILIAS  release_8 Revision v8.24
class.ilContainerPageGUI.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
4
31{
33 protected int $requested_ref_id = 0;
34
35 public function __construct(
36 int $a_id = 0,
37 int $a_old_nr = 0,
38 string $a_lang = ""
39 ) {
41 global $DIC;
42
43 $this->tpl = $DIC["tpl"];
44 $this->obj_definition = $DIC["objDefinition"];
45 $request = $DIC->container()->internal()->gui()->standardRequest();
46 $this->requested_ref_id = $request->getRefId();
47
48 parent::__construct("cont", $a_id, $a_old_nr, false, $a_lang);
49 }
50
51 public function getProfileBackUrl(): string
52 {
53 $link = ilLink::_getLink($this->requested_ref_id);
54 // make it relative, since profile only accepts relative links as back links
55 $link = substr($link, strpos($link, "//") + 2);
56 $link = substr($link, strpos($link, "/"));
57 return $link;
58 }
59
60 public function finishEditing(): void
61 {
62 $this->ctrl->returnToParent($this);
63 }
64
65 public function getAdditionalPageActions(): array
66 {
68 $ui = $this->ui;
70
72 ilObject::_lookupObjectId($this->requested_ref_id)
73 );
74
75 $class = $this->obj_definition->getClassName($type);
76
77 $items = [];
78 if ($class !== "") {
79 $items[] = $ui->factory()->link()->standard(
80 $lng->txt("obj_sty"),
82 "ilRepositoryGUI",
83 "ilObj" . $class . "GUI"
84 ], "editStyleProperties")
85 );
86 }
87 return $items;
88 }
89}
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getAdditionalPageActions()
Get additional page actions.
ilObjectDefinition $obj_definition
getLinkTargetByClass( $a_class, string $a_cmd=null, string $a_anchor=null, bool $is_async=false, bool $has_xml_style=false)
@inheritDoc
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
parses the objects.xml it handles the xml-description of all ilias objects
static _lookupObjectId(int $ref_id)
static _lookupType(int $id, bool $reference=false)
Class ilPageObjectGUI.
ILIAS DI UIServices $ui
EditGUIRequest $request
__construct(string $a_parent_type, int $a_id, int $a_old_nr=0, bool $a_prevent_get_id=false, string $a_lang="", string $concrete_lang="")
global $DIC
Definition: feed.php:28
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
$type