19declare(strict_types=1);
43 $current = end($this->stack);
45 if ($current->hasReferenceId()) {
46 $reference_id = $current->getReferenceId();
47 $ref_id = $reference_id->toInt();
58 $last = end($this->stack);
76 foreach ($this->stack as $item) {
77 $return[] = $item->getUniqueContextIdentifier();
85 $mapper = (
static fn(
ScreenContext $c):
string =>
$c->getUniqueContextIdentifier());
86 $mine = array_map($mapper, $this->
getStack());
87 $theirs = array_map($mapper, $other_collection->
getStack());
89 return (array_intersect($mine, $theirs) !== []);
92 public function main(): self
102 $this->
push($this->repo->desktop());
109 $this->
push($this->repo->repository());
116 $this->
push($this->repo->administration());
121 public function internal():
self
123 $this->
push($this->repo->internal());
130 $this->
push($this->repo->external());
135 public function lti(): self
137 $this->
push($this->repo->lti());
The Collection of all available Contexts in the System.
hasMatch(ContextCollection $other_collection)
push(ScreenContext $context)
__construct(protected ContextRepository $repo)