ILIAS  release_7 Revision v7.30-3-g800a261c036
ILIAS\GlobalScreen\ScreenContext\ContextRepository Class Reference

Class ContextRepository. More...

+ Collaboration diagram for ILIAS\GlobalScreen\ScreenContext\ContextRepository:

Public Member Functions

 main ()
 
 external ()
 
 desktop ()
 
 repository ()
 
 administration ()
 
 lti ()
 

Private Member Functions

 get (string $class_name, string $identifier)
 

Private Attributes

 $contexts = []
 
const C_MAIN = 'main'
 
const C_DESKTOP = 'desktop'
 
const C_REPO = 'repo'
 
const C_ADMINISTRATION = 'administration'
 
const C_LTI = 'lti'
 

Detailed Description

Class ContextRepository.

The Collection of all available Contexts in the System. You can use them in your

See also
ScreenContextAwareProvider to announce you are interested in.
Author
Fabian Schmid fs@st.nosp@m.uder.nosp@m.-raim.nosp@m.ann..nosp@m.ch

Definition at line 32 of file ContextRepository.php.

Member Function Documentation

◆ administration()

ILIAS\GlobalScreen\ScreenContext\ContextRepository::administration ( )
Returns
ScreenContext

Definition at line 91 of file ContextRepository.php.

91 : ScreenContext
92 {
93 return $this->get(BasicScreenContext::class, self::C_ADMINISTRATION);
94 }

References ILIAS\GlobalScreen\ScreenContext\ContextRepository\C_ADMINISTRATION.

◆ desktop()

ILIAS\GlobalScreen\ScreenContext\ContextRepository::desktop ( )
Returns
ScreenContext

Definition at line 72 of file ContextRepository.php.

72 : ScreenContext
73 {
74 return $this->get(BasicScreenContext::class, self::C_DESKTOP);
75 }

References ILIAS\GlobalScreen\ScreenContext\ContextRepository\C_DESKTOP.

◆ external()

ILIAS\GlobalScreen\ScreenContext\ContextRepository::external ( )
Returns
ScreenContext

Definition at line 64 of file ContextRepository.php.

64 : ScreenContext
65 {
66 return $this->get(BasicScreenContext::class, 'external');
67 }

◆ get()

ILIAS\GlobalScreen\ScreenContext\ContextRepository::get ( string  $class_name,
string  $identifier 
)
private

Definition at line 104 of file ContextRepository.php.

104 : ScreenContext
105 {
106 if (!isset($this->contexts[$identifier])) {
107 $this->contexts[$identifier] = new $class_name($identifier);
108 }
109
110 return $this->contexts[$identifier];
111 }

◆ lti()

ILIAS\GlobalScreen\ScreenContext\ContextRepository::lti ( )
Returns
ScreenContext

Definition at line 99 of file ContextRepository.php.

99 : ScreenContext
100 {
101 return $this->get(BasicScreenContext::class, self::C_LTI);
102 }

References ILIAS\GlobalScreen\ScreenContext\ContextRepository\C_LTI.

◆ main()

ILIAS\GlobalScreen\ScreenContext\ContextRepository::main ( )
Returns
ScreenContext

Definition at line 48 of file ContextRepository.php.

48 : ScreenContext
49 {
50 return $this->get(BasicScreenContext::class, self::C_MAIN);
51 }

References ILIAS\GlobalScreen\ScreenContext\ContextRepository\C_MAIN.

◆ repository()

ILIAS\GlobalScreen\ScreenContext\ContextRepository::repository ( )
Returns
ScreenContext

Definition at line 80 of file ContextRepository.php.

80 : ScreenContext
81 {
82 $context = $this->get(BasicScreenContext::class, self::C_REPO);
83 $context = $context->withReferenceId(new ReferenceId((int) ($_GET['ref_id'] ?? 0)));
84
85 return $context;
86 }
$_GET["client_id"]
$context
Definition: webdav.php:26

References $_GET, $context, and ILIAS\GlobalScreen\ScreenContext\ContextRepository\C_REPO.

Field Documentation

◆ $contexts

ILIAS\GlobalScreen\ScreenContext\ContextRepository::$contexts = []
private

Definition at line 37 of file ContextRepository.php.

◆ C_ADMINISTRATION

const ILIAS\GlobalScreen\ScreenContext\ContextRepository::C_ADMINISTRATION = 'administration'
private

◆ C_DESKTOP

const ILIAS\GlobalScreen\ScreenContext\ContextRepository::C_DESKTOP = 'desktop'
private

◆ C_LTI

const ILIAS\GlobalScreen\ScreenContext\ContextRepository::C_LTI = 'lti'
private

◆ C_MAIN

const ILIAS\GlobalScreen\ScreenContext\ContextRepository::C_MAIN = 'main'
private

◆ C_REPO

const ILIAS\GlobalScreen\ScreenContext\ContextRepository::C_REPO = 'repo'
private

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