ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ILIAS\GlobalScreen\ScreenContext\Stack\ContextCollection Class Reference
+ Inheritance diagram for ILIAS\GlobalScreen\ScreenContext\Stack\ContextCollection:
+ Collaboration diagram for ILIAS\GlobalScreen\ScreenContext\Stack\ContextCollection:

Public Member Functions

 __construct (protected ContextRepository $repo)
 
 push (ScreenContext $context)
 
 getLast ()
 
 getStack ()
 
 getStackAsArray ()
 
 hasMatch (ContextCollection $other_collection)
 
 main ()
 
 desktop ()
 
 repository ()
 
 administration ()
 
 external ()
 
 lti ()
 

Data Fields

function return $this: self { $this->push($this->repo->internal())
 

Protected Attributes

array $stack = []
 

Detailed Description

Definition at line 30 of file ContextCollection.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\GlobalScreen\ScreenContext\Stack\ContextCollection::__construct ( protected ContextRepository  $repo)

Definition at line 37 of file ContextCollection.php.

38 {
39 }

Member Function Documentation

◆ administration()

ILIAS\GlobalScreen\ScreenContext\Stack\ContextCollection::administration ( )

Definition at line 114 of file ContextCollection.php.

114 : self
115 {
116 $this->push($this->repo->administration());
117
118 return $this;
119 }

References ILIAS\GlobalScreen\ScreenContext\Stack\ContextCollection\$this, and ILIAS\GlobalScreen\ScreenContext\Stack\ContextCollection\push().

+ Here is the call graph for this function:

◆ desktop()

ILIAS\GlobalScreen\ScreenContext\Stack\ContextCollection::desktop ( )

Definition at line 100 of file ContextCollection.php.

100 : self
101 {
102 $this->push($this->repo->desktop());
103
104 return $this;
105 }

References ILIAS\GlobalScreen\ScreenContext\Stack\ContextCollection\$this, and ILIAS\GlobalScreen\ScreenContext\Stack\ContextCollection\push().

Referenced by DashboardLayoutProvider\isInterestedInContexts().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ external()

ILIAS\GlobalScreen\ScreenContext\Stack\ContextCollection::external ( )

Reimplemented in ILIAS\GlobalScreen\ScreenContext\Stack\CalledContexts.

Definition at line 128 of file ContextCollection.php.

128 : self
129 {
130 $this->push($this->repo->external());
131
132 return $this;
133 }

References ILIAS\GlobalScreen\ScreenContext\Stack\ContextCollection\$this, and ILIAS\GlobalScreen\ScreenContext\Stack\ContextCollection\push().

Referenced by ILIAS\Init\Provider\StartUpModificationProvider\isInterestedInContexts(), and ILIAS\Repository\Provider\RepositoryOpenGraphExposer\isInterestedInContexts().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getLast()

ILIAS\GlobalScreen\ScreenContext\Stack\ContextCollection::getLast ( )

Definition at line 56 of file ContextCollection.php.

57 {
58 $last = end($this->stack);
59 if ($last instanceof ScreenContext) {
60 return $last;
61 }
62 return null;
63 }

Referenced by ILIAS\GlobalScreen\ScreenContext\Stack\CalledContexts\current().

+ Here is the caller graph for this function:

◆ getStack()

ILIAS\GlobalScreen\ScreenContext\Stack\ContextCollection::getStack ( )

◆ getStackAsArray()

ILIAS\GlobalScreen\ScreenContext\Stack\ContextCollection::getStackAsArray ( )

Definition at line 73 of file ContextCollection.php.

73 : array
74 {
75 $return = [];
76 foreach ($this->stack as $item) {
77 $return[] = $item->getUniqueContextIdentifier();
78 }
79
80 return $return;
81 }

◆ hasMatch()

ILIAS\GlobalScreen\ScreenContext\Stack\ContextCollection::hasMatch ( ContextCollection  $other_collection)

Definition at line 83 of file ContextCollection.php.

83 : bool
84 {
85 $mapper = (static fn(ScreenContext $c): string => $c->getUniqueContextIdentifier());
86 $mine = array_map($mapper, $this->getStack());
87 $theirs = array_map($mapper, $other_collection->getStack());
88
89 return (array_intersect($mine, $theirs) !== []);
90 }
$c
Definition: deliver.php:25

References $c, and ILIAS\GlobalScreen\ScreenContext\Stack\ContextCollection\getStack().

Referenced by ILIAS\Repository\Provider\RepositoryOpenGraphExposer\ensureRepoContext().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ lti()

ILIAS\GlobalScreen\ScreenContext\Stack\ContextCollection::lti ( )

Definition at line 135 of file ContextCollection.php.

135 : self
136 {
137 $this->push($this->repo->lti());
138 return $this;
139 }

References ILIAS\GlobalScreen\ScreenContext\Stack\ContextCollection\$this, and ILIAS\GlobalScreen\ScreenContext\Stack\ContextCollection\push().

Referenced by ILIAS\LTI\Screen\LtiViewLayoutProvider\isInterestedInContexts().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ main()

ILIAS\GlobalScreen\ScreenContext\Stack\ContextCollection::main ( )

Definition at line 92 of file ContextCollection.php.

92 : self
93 {
94 $context = $this->repo->main();
95 $this->push($context);
96
97 return $this;
98 }
$context
Definition: webdav.php:31

References $context, ILIAS\GlobalScreen\ScreenContext\Stack\ContextCollection\$this, and ILIAS\GlobalScreen\ScreenContext\Stack\ContextCollection\push().

Referenced by ilAdminGSToolProvider\isInterestedInContexts(), ilCOPageEditGSToolProvider\isInterestedInContexts(), ilExerciseGSToolProvider\isInterestedInContexts(), ilHTMLExportViewLayoutProvider\isInterestedInContexts(), ilHelpGSToolProvider\isInterestedInContexts(), ilHelpViewLayoutProvider\isInterestedInContexts(), ILIAS\Init\StartupSequence\StartUpSequenceLayoutProvider\isInterestedInContexts(), ilLMEditGSToolProvider\isInterestedInContexts(), ilLMGSToolProvider\isInterestedInContexts(), ilLSViewLayoutProvider\isInterestedInContexts(), ILIAS\Mail\Provider\MailGlobalScreenToolProvider\isInterestedInContexts(), ilMediaPoolGSToolProvider\isInterestedInContexts(), ILIAS\MetaData\Editor\Tree\MDEditorToolProvider\isInterestedInContexts(), ILIAS\OrgUnit\Provider\OrgUnitToolProvider\isInterestedInContexts(), ilWorkspaceGSToolProvider\isInterestedInContexts(), ilSkillGSToolProvider\isInterestedInContexts(), ilTaxonomyGSToolProvider\isInterestedInContexts(), ilTestPlayerLayoutProvider\isInterestedInContexts(), ilTestPlayerToolProvider\isInterestedInContexts(), ILIAS\Test\Presentation\PrintLayoutProvider\isInterestedInContexts(), and ILIAS\UICore\PageContentProvider\isInterestedInContexts().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ push()

ILIAS\GlobalScreen\ScreenContext\Stack\ContextCollection::push ( ScreenContext  $context)

Reimplemented in ILIAS\GlobalScreen\ScreenContext\Stack\CalledContexts.

Definition at line 41 of file ContextCollection.php.

41 : void
42 {
43 $current = end($this->stack);
44 if ($current instanceof ScreenContext) {
45 if ($current->hasReferenceId()) {
46 $reference_id = $current->getReferenceId();
47 $ref_id = $reference_id->toInt();
48 $context = $context->withReferenceId($reference_id);
49 }
50 $context = $context->withAdditionalData($current->getAdditionalData());
51 }
52
53 $this->stack[] = $context;
54 }
$ref_id
Definition: ltiauth.php:66

References $context, and $ref_id.

Referenced by ILIAS\GlobalScreen\ScreenContext\Stack\ContextCollection\administration(), ILIAS\GlobalScreen\ScreenContext\Stack\ContextCollection\desktop(), ILIAS\GlobalScreen\ScreenContext\Stack\ContextCollection\external(), ILIAS\GlobalScreen\ScreenContext\Stack\ContextCollection\lti(), ILIAS\GlobalScreen\ScreenContext\Stack\ContextCollection\main(), and ILIAS\GlobalScreen\ScreenContext\Stack\ContextCollection\repository().

+ Here is the caller graph for this function:

◆ repository()

ILIAS\GlobalScreen\ScreenContext\Stack\ContextCollection::repository ( )

Field Documentation

◆ $stack

array ILIAS\GlobalScreen\ScreenContext\Stack\ContextCollection::$stack = []
protected

◆ $this

function return ILIAS\GlobalScreen\ScreenContext\Stack\ContextCollection::$this

Definition at line 125 of file ContextCollection.php.

Referenced by ILIAS\GlobalScreen\ScreenContext\Stack\ContextCollection\administration(), ILIAS\UI\Implementation\Component\Table\Ordering\applyViewControls(), ILIAS\GlobalScreen\ScreenContext\Stack\ContextCollection\desktop(), ILIAS\GlobalScreen\ScreenContext\Stack\CalledContexts\external(), ILIAS\GlobalScreen\ScreenContext\Stack\ContextCollection\external(), ILIAS\GlobalScreen\ScreenContext\Stack\ContextCollection\lti(), ILIAS\GlobalScreen\ScreenContext\Stack\ContextCollection\main(), ILIAS\GlobalScreen\ScreenContext\Stack\ContextCollection\repository(), ILIAS\UI\Implementation\Component\Table\PresentationRow\withAction(), ILIAS\UI\Implementation\Component\Table\AbstractTable\withActions(), ILIAS\UI\Implementation\Component\Table\PresentationRow\withContent(), ILIAS\UI\Implementation\Component\Table\Presentation\withData(), ILIAS\UI\Implementation\Component\Table\DataRow\withDisabledAction(), ILIAS\UI\Implementation\Component\Table\Presentation\withEnvironment(), ILIAS\UI\Implementation\Component\Table\PresentationRow\withFurtherFields(), ILIAS\UI\Implementation\Component\Table\PresentationRow\withFurtherFieldsHeadline(), ILIAS\UI\Implementation\Component\Table\PresentationRow\withHeadline(), ILIAS\UI\Implementation\Component\Table\AbstractTable\withId(), ILIAS\UI\Implementation\Component\Table\PresentationRow\withImportantFields(), ILIAS\UI\Implementation\Component\Table\PresentationRow\withLeadingSymbol(), ILIAS\UI\Implementation\Component\Table\Ordering\withOrderingDisabled(), ILIAS\UI\Implementation\Component\Table\OrderingRow\withOrderingDisabled(), ILIAS\UI\Implementation\Component\Table\OrderingRow\withPosition(), ILIAS\UI\Implementation\Component\Table\AbstractTable\withRequest(), ILIAS\UI\Implementation\Component\Table\PresentationRow\withResetSignals(), ILIAS\UI\Implementation\Component\Table\Presentation\withRowMapping(), ILIAS\UI\Implementation\Component\Table\PresentationRow\withSubheadline(), and ILIAS\UI\Implementation\Component\Table\Table\withTitle().


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