ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
BasicScreenContext.php
Go to the documentation of this file.
2 
5 
12 {
13 
17  protected $reference_id;
21  protected $additional_data;
25  protected $context_identifier = '';
26 
27 
33  public function __construct(string $context_identifier)
34  {
35  $this->context_identifier = $context_identifier;
36  $this->additional_data = new Collection();
37  $this->reference_id = new ReferenceId(0);
38  }
39 
40 
44  public function hasReferenceId() : bool
45  {
46  return $this->reference_id instanceof ReferenceId && $this->reference_id->toInt() > 0;
47  }
48 
49 
53  public function getReferenceId() : ReferenceId
54  {
55  return $this->reference_id;
56  }
57 
58 
63  {
64  $clone = clone $this;
65  $clone->reference_id = $reference_id;
66 
67  return $clone;
68  }
69 
70 
74  public function withAdditionalData(Collection $collection) : ScreenContext
75  {
76  $clone = clone $this;
77  $clone->additional_data = $collection;
78 
79  return $clone;
80  }
81 
82 
86  public function getAdditionalData() : Collection
87  {
89  }
90 
91 
95  public function addAdditionalData(string $key, $value) : ScreenContext
96  {
97  $this->additional_data->add($key, $value);
98 
99  return $this;
100  }
101 
102 
106  public function getUniqueContextIdentifier() : string
107  {
109  }
110 }
toInt()
Get the password-string.
Definition: ReferenceId.php:37
__construct(string $context_identifier)
BasicScreenContext constructor.