‪TYPO3CMS  10.4
AppendLinkHandlerElementsEvent.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
5 /*
6  * This file is part of the TYPO3 CMS project.
7  *
8  * It is free software; you can redistribute it and/or modify it under
9  * the terms of the GNU General Public License, either version 2
10  * of the License, or any later version.
11  *
12  * For the full copyright and license information, please read the
13  * LICENSE.txt file that was distributed with this source code.
14  *
15  * The TYPO3 project - inspiring people to share!
16  */
17 
19 
24 {
28  private ‪$linkParts;
29 
33  private ‪$content;
34 
38  private ‪$elements;
39 
43  private ‪$idx;
44 
48  private ‪$tokenId;
49 
53  private ‪$isResolved = false;
54 
55  public function ‪__construct(array ‪$linkParts, string ‪$content, array ‪$elements, int ‪$idx, string $tokenID)
56  {
57  $this->linkParts = ‪$linkParts;
58  $this->content = ‪$content;
59  $this->elements = ‪$elements;
60  $this->idx = ‪$idx;
61  $this->tokenId = $tokenID;
62  }
63 
64  public function ‪getLinkParts(): array
65  {
66  return ‪$this->linkParts;
67  }
68 
69  public function ‪getContent(): string
70  {
71  return ‪$this->content;
72  }
73 
74  public function ‪getElements(): array
75  {
76  return ‪$this->elements;
77  }
78 
79  public function ‪getIdx(): int
80  {
81  return ‪$this->idx;
82  }
83 
84  public function ‪getTokenId(): string
85  {
86  return ‪$this->tokenId;
87  }
88 
89  public function ‪setLinkParts(array ‪$linkParts): void
90  {
91  $this->linkParts = ‪$linkParts;
92  }
93 
94  public function ‪setContent(string ‪$content): void
95  {
96  $this->content = ‪$content;
97  }
98 
99  public function ‪setElements(array ‪$elements): void
100  {
101  $this->elements = ‪$elements;
102  }
103 
104  public function ‪addElements(array ‪$elements)
105  {
106  $this->elements = array_replace_recursive($this->elements, ‪$elements);
107  $this->‪isResolved = true;
108  }
109 
110  public function ‪isResolved(): bool
111  {
112  return ‪$this->isResolved;
113  }
114 }
‪TYPO3\CMS\Core\DataHandling\Event
Definition: AppendLinkHandlerElementsEvent.php:18