ILIAS  trunk Revision v11.0_alpha-1866-gfa368f7776e
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
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.

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

114  : self
115  {
116  $this->push($this->repo->administration());
117 
118  return $this;
119  }
+ Here is the call graph for this function:

◆ desktop()

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

Definition at line 100 of file ContextCollection.php.

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

Referenced by DashboardLayoutProvider\isInterestedInContexts().

100  : self
101  {
102  $this->push($this->repo->desktop());
103 
104  return $this;
105  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ external()

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

Definition at line 128 of file ContextCollection.php.

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().

128  : self
129  {
130  $this->push($this->repo->external());
131 
132  return $this;
133  }
+ 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.

References null.

Referenced by ILIAS\GlobalScreen\ScreenContext\Stack\CalledContexts\current(), ILIAS\Mail\Provider\MailGlobalScreenToolProvider\getToolsForContextStack(), and ILIAS\MetaData\Editor\Tree\MDEditorToolProvider\getToolsForContextStack().

56  : ?ScreenContext
57  {
58  $last = end($this->stack);
59  if ($last instanceof ScreenContext) {
60  return $last;
61  }
62  return null;
63  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
+ Here is the caller graph for this function:

◆ getStack()

ILIAS\GlobalScreen\ScreenContext\Stack\ContextCollection::getStack ( )
Returns
ScreenContext[]

Definition at line 68 of file ContextCollection.php.

References ILIAS\GlobalScreen\ScreenContext\Stack\ContextCollection\$stack.

Referenced by ILIAS\GlobalScreen\ScreenContext\Stack\ContextCollection\hasMatch().

68  : array
69  {
70  return $this->stack;
71  }
+ Here is the caller graph for this function:

◆ 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.

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

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

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
+ 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.

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

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

135  : self
136  {
137  $this->push($this->repo->lti());
138  return $this;
139  }
+ 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.

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

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

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

Definition at line 41 of file ContextCollection.php.

References $context, $ref_id, ILIAS\GlobalScreen\ScreenContext\ScreenContext\withAdditionalData(), and ILIAS\GlobalScreen\ScreenContext\ScreenContext\withReferenceId().

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().

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  }
$context
Definition: webdav.php:31
$ref_id
Definition: ltiauth.php:65
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ repository()

Field Documentation

◆ $stack

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

◆ $this


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