ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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 ()
 

Detailed Description

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

Definition at line 28 of file Context.php.

Constructor & Destructor Documentation

◆ __construct()

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

Definition at line 30 of file Context.php.

31 {
32 }

Member Function Documentation

◆ checkPermission()

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

Definition at line 64 of file Context.php.

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

References $ref_id.

◆ ctrl()

ILIAS\StaticURL\Context::ctrl ( )

Definition at line 59 of file Context.php.

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

Referenced by ilKSDocumentationGotoLink\handle().

+ Here is the caller graph for this function:

◆ exists()

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

Definition at line 74 of file Context.php.

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

References $ref_id.

◆ getParentRefId()

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

Definition at line 69 of file Context.php.

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

References $ref_id.

◆ getUserId()

ILIAS\StaticURL\Context::getUserId ( )

Definition at line 79 of file Context.php.

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

◆ getUserLanguage()

ILIAS\StaticURL\Context::getUserLanguage ( )

Definition at line 34 of file Context.php.

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

◆ http()

ILIAS\StaticURL\Context::http ( )

Definition at line 54 of file Context.php.

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

◆ isPublicSectionActive()

ILIAS\StaticURL\Context::isPublicSectionActive ( )

Definition at line 89 of file Context.php.

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

◆ isUserLoggedIn()

ILIAS\StaticURL\Context::isUserLoggedIn ( )

Definition at line 84 of file Context.php.

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

◆ lng()

ILIAS\StaticURL\Context::lng ( )

Definition at line 44 of file Context.php.

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

◆ mainTemplate()

ILIAS\StaticURL\Context::mainTemplate ( )

Definition at line 49 of file Context.php.

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

◆ refinery()

ILIAS\StaticURL\Context::refinery ( )

Definition at line 39 of file Context.php.

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

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