37 return $this->container->user()->getCurrentLanguage();
42 return $this->container->refinery();
47 return $this->container->language();
52 return $this->container->ui()->mainTemplate();
57 return $this->container->http();
62 return $this->container->ctrl();
67 return $this->container->access()->checkAccess($permission,
'',
$ref_id);
72 return $this->container->repositoryTree()->getParentId(
$ref_id);
77 return $this->container->repositoryTree()->isInTree(
$ref_id);
82 $tree = $this->container->repositoryTree();
83 if ($ref_id <= 0 || !$tree->isInTree(
$ref_id)) {
87 $root_id = $tree->getRootId();
90 while (($parent = (
int) $tree->getParentId($current)) > 0) {
91 if (isset($visited[$parent])) {
94 $visited[$parent] =
true;
98 if ($parent === $root_id) {
109 return $this->container->user()->getId();
114 return !$this->container->user()->isAnonymous() && $this->container->user()->getId() !== 0;
119 return (
bool) ($this->container->settings()->get(
'pub_section') ??
false);
124 return $this->container[
'static_url']->builder();
Customizing of pimple-DIC for ILIAS.
Builds a Color from either hex- or rgb values.
__construct(private Container $container)
checkPermission(string $permission, int $ref_id)
findFirstAccessibleParentRefId(int $ref_id, string $permission='read')
getParentRefId(int $ref_id)
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...