ILIAS  trunk Revision v11.0_alpha-2638-g80c1d007f79
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.

Referenced by ILIAS\Exercise\PermanentLink\StaticURLHandler\handle(), ILIAS\Test\StaticURLHandler\handle(), and ILIAS\Export\ExportHandler\StaticUrlHandler\handle().

64  : bool
65  {
66  return $this->container->access()->checkAccess($permission, '', $ref_id);
67  }
$ref_id
Definition: ltiauth.php:65
+ Here is the caller graph for this function:

◆ ctrl()

ILIAS\StaticURL\Context::ctrl ( )

Definition at line 59 of file Context.php.

Referenced by ILIAS\Exercise\PermanentLink\StaticURLHandler\handle(), ilKSDocumentationGotoLink\handle(), ILIAS\Test\StaticURLHandler\handle(), ILIAS\User\StaticURLHandler\handle(), ILIAS\Export\ExportHandler\StaticUrlHandler\handle(), and ILIAS\StaticURL\Handler\LegacyGotoHandler\handle().

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...
+ 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  }
$ref_id
Definition: ltiauth.php:65

◆ 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  }
$ref_id
Definition: ltiauth.php:65

◆ getUserId()

ILIAS\StaticURL\Context::getUserId ( )

Definition at line 79 of file Context.php.

Referenced by ILIAS\Export\ExportHandler\StaticUrlHandler\handle(), and ILIAS\StaticURL\Handler\LegacyGotoHandler\handle().

79  : int
80  {
81  return $this->container->user()->getId();
82  }
+ Here is the caller graph for this function:

◆ getUserLanguage()

ILIAS\StaticURL\Context::getUserLanguage ( )

Definition at line 34 of file Context.php.

Referenced by ILIAS\User\StaticURLHandler\getLoginUrl().

34  : string
35  {
36  return $this->container->user()->getCurrentLanguage();
37  }
+ Here is the caller graph for this function:

◆ http()

ILIAS\StaticURL\Context::http ( )

Definition at line 54 of file Context.php.

Referenced by ILIAS\StaticURL\Handler\HandlerService\appendUnknownParameters().

54  : Services
55  {
56  return $this->container->http();
57  }
+ Here is the caller graph for this function:

◆ isPublicSectionActive()

ILIAS\StaticURL\Context::isPublicSectionActive ( )

Definition at line 89 of file Context.php.

Referenced by ILIAS\Export\ExportHandler\StaticUrlHandler\handle().

89  : bool
90  {
91  return (bool) ($this->container->settings()->get('pub_section') ?? false);
92  }
+ Here is the caller graph for this function:

◆ isUserLoggedIn()

ILIAS\StaticURL\Context::isUserLoggedIn ( )

Definition at line 84 of file Context.php.

Referenced by ILIAS\Test\StaticURLHandler\handle(), ILIAS\User\StaticURLHandler\handle(), and ILIAS\Export\ExportHandler\StaticUrlHandler\handle().

84  : bool
85  {
86  return !$this->container->user()->isAnonymous() && $this->container->user()->getId() !== 0;
87  }
+ Here is the caller graph for this function:

◆ lng()

ILIAS\StaticURL\Context::lng ( )

Definition at line 44 of file Context.php.

44  : \ilLanguage
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.

Referenced by ILIAS\StaticURL\Handler\HandlerService\appendUnknownParameters().

39  : Factory
40  {
41  return $this->container->refinery();
42  }
+ Here is the caller graph for this function:

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