ILIAS  release_7 Revision v7.30-3-g800a261c036
BasicScreenContext.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
21
24
30{
34 protected $reference_id;
42 protected $context_identifier = '';
43
48 public function __construct(string $context_identifier)
49 {
50 $this->context_identifier = $context_identifier;
51 $this->additional_data = new Collection();
52 $this->reference_id = new ReferenceId(0);
53 }
54
58 public function hasReferenceId() : bool
59 {
60 return $this->reference_id->toInt() > 0;
61 }
62
66 public function getReferenceId() : ReferenceId
67 {
69 }
70
75 {
76 $clone = clone $this;
77 $clone->reference_id = $reference_id;
78
79 return $clone;
80 }
81
85 public function withAdditionalData(Collection $collection) : ScreenContext
86 {
87 $clone = clone $this;
88 $clone->additional_data = $collection;
89
90 return $clone;
91 }
92
96 public function getAdditionalData() : Collection
97 {
99 }
100
104 public function addAdditionalData(string $key, $value) : ScreenContext
105 {
106 $this->additional_data->add($key, $value);
107
108 return $this;
109 }
110
114 public function getUniqueContextIdentifier() : string
115 {
117 }
118}
An exception for terminatinating execution or to throw for unit testing.
withAdditionalData(Collection $collection)
@inheritDoc
__construct(string $context_identifier)
BasicScreenContext constructor.
withReferenceId(ReferenceId $reference_id)
@inheritDoc