ILIAS  release_7 Revision v7.30-3-g800a261c036
class.ilContainerPageGUI.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 1998-2013 ILIAS open source, Extended GPL, see docs/LICENSE */
4
5include_once("./Services/COPage/classes/class.ilPageObjectGUI.php");
6include_once("./Services/Container/classes/class.ilContainerPage.php");
7
20{
24 protected $obj_definition;
25
29 public function __construct($a_id = 0, $a_old_nr = 0, $a_lang = "")
30 {
32 global $DIC;
33
34 $this->tpl = $DIC["tpl"];
35 $tpl = $DIC["tpl"];
36 $this->obj_definition = $DIC["objDefinition"];
37 $params = $DIC->http()->request()->getQueryParams();
38 $this->requested_ref_id = (int) ($params["ref_id"] ?? 0);
39
40 parent::__construct("cont", $a_id, $a_old_nr, false, $a_lang);
41 }
42
46 public function getProfileBackUrl()
47 {
48 include_once("./Services/Link/classes/class.ilLink.php");
49 $link = ilLink::_getLink((int) $_GET["ref_id"]);
50 // make it relative, since profile only accepts relative links as back links
51 $link = substr($link, strpos($link, "//") + 2);
52 $link = substr($link, strpos($link, "/"));
53 return $link;
54 }
55
56 public function finishEditing()
57 {
58 $this->ctrl->returnToParent($this);
59 }
60
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"),
81 $ctrl->getLinkTargetByClass([
82 "ilRepositoryGUI",
83 "ilObj".$class."GUI"
84 ], "editStyleProperties")
85 );
86 }
87 return $items;
88 }
89
90}
$_GET["client_id"]
An exception for terminatinating execution or to throw for unit testing.
Container page GUI class.
getProfileBackUrl()
Get profile back url.
getAdditionalPageActions()
Get additional page actions.
static _lookupObjectId($a_ref_id)
lookup object id
static _lookupType($a_id, $a_reference=false)
lookup object type
Class ilPageObjectGUI.
__construct( $a_parent_type, $a_id, $a_old_nr=0, $a_prevent_get_id=false, $a_lang="", $concrete_lang="")
Constructor.
global $DIC
Definition: goto.php:24
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
$type