ILIAS  trunk Revision v12.0_alpha-377-g3641b37b9db
ILIAS\StaticURL\Context Class Reference
+ Collaboration diagram for ILIAS\StaticURL\Context:

Public Member Functions

 __construct (private Container $container)
 
 getUserLanguage ()
 
 refinery ()
 
 lng ()
 
 mainTemplate ()
 
 http ()
 
 ctrl ()
 
 checkPermission (string $permission, int $ref_id)
 
 getParentRefId (int $ref_id)
 
 exists (int $ref_id)
 
 getUserId ()
 
 isUserLoggedIn ()
 
 isPublicSectionActive ()
 
 builder ()
 

Detailed Description

Author
Fabian Schmid fabia.nosp@m.n@sr.nosp@m..solu.nosp@m.tion.nosp@m.s

Definition at line 29 of file Context.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\StaticURL\Context::__construct ( private Container  $container)

Definition at line 31 of file Context.php.

32 {
33 }

Member Function Documentation

◆ builder()

ILIAS\StaticURL\Context::builder ( )

Definition at line 95 of file Context.php.

95 : URIBuilder
96 {
97 return $this->container['static_url']->builder();
98 }

◆ checkPermission()

ILIAS\StaticURL\Context::checkPermission ( string  $permission,
int  $ref_id 
)

Definition at line 65 of file Context.php.

65 : bool
66 {
67 return $this->container->access()->checkAccess($permission, '', $ref_id);
68 }
$ref_id
Definition: ltiauth.php:66

References $ref_id.

◆ ctrl()

ILIAS\StaticURL\Context::ctrl ( )

Definition at line 60 of file Context.php.

61 {
62 return $this->container->ctrl();
63 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

Referenced by ilKSDocumentationGotoLink\handle(), and ILIAS\User\StaticURLHandler\handle().

+ Here is the caller graph for this function:

◆ exists()

ILIAS\StaticURL\Context::exists ( int  $ref_id)

Definition at line 75 of file Context.php.

75 : bool
76 {
77 return $this->container->repositoryTree()->isInTree($ref_id);
78 }

References $ref_id.

◆ getParentRefId()

ILIAS\StaticURL\Context::getParentRefId ( int  $ref_id)

Definition at line 70 of file Context.php.

70 : ?int
71 {
72 return $this->container->repositoryTree()->getParentId($ref_id);
73 }

References $ref_id.

◆ getUserId()

ILIAS\StaticURL\Context::getUserId ( )

Definition at line 80 of file Context.php.

80 : int
81 {
82 return $this->container->user()->getId();
83 }

◆ getUserLanguage()

ILIAS\StaticURL\Context::getUserLanguage ( )

Definition at line 35 of file Context.php.

35 : string
36 {
37 return $this->container->user()->getCurrentLanguage();
38 }

◆ http()

ILIAS\StaticURL\Context::http ( )

Definition at line 55 of file Context.php.

55 : Services
56 {
57 return $this->container->http();
58 }

Referenced by ILIAS\StaticURL\Shortlinks\Handler\handle().

+ Here is the caller graph for this function:

◆ isPublicSectionActive()

ILIAS\StaticURL\Context::isPublicSectionActive ( )

Definition at line 90 of file Context.php.

90 : bool
91 {
92 return (bool) ($this->container->settings()->get('pub_section') ?? false);
93 }

◆ isUserLoggedIn()

ILIAS\StaticURL\Context::isUserLoggedIn ( )

Definition at line 85 of file Context.php.

85 : bool
86 {
87 return !$this->container->user()->isAnonymous() && $this->container->user()->getId() !== 0;
88 }

◆ lng()

ILIAS\StaticURL\Context::lng ( )

Definition at line 45 of file Context.php.

46 {
47 return $this->container->language();
48 }
language handling

◆ mainTemplate()

ILIAS\StaticURL\Context::mainTemplate ( )

Definition at line 50 of file Context.php.

51 {
52 return $this->container->ui()->mainTemplate();
53 }

◆ refinery()

ILIAS\StaticURL\Context::refinery ( )

Definition at line 40 of file Context.php.

40 : Factory
41 {
42 return $this->container->refinery();
43 }

The documentation for this class was generated from the following file: