‪TYPO3CMS  ‪main
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 {
25  private bool ‪$isResolved = false;
26 
27  public function ‪__construct(
28  private array $linkParts,
29  private string $content,
30  private array $elements,
31  private readonly int $idx,
32  private readonly string $tokenId
33  ) {}
34 
35  public function ‪getLinkParts(): array
36  {
37  return $this->linkParts;
38  }
39 
40  public function ‪getContent(): string
41  {
42  return $this->content;
43  }
44 
45  public function ‪getElements(): array
46  {
47  return $this->elements;
48  }
49 
50  public function ‪getIdx(): int
51  {
52  return $this->idx;
53  }
54 
55  public function ‪getTokenId(): string
56  {
57  return $this->tokenId;
58  }
59 
60  public function ‪setLinkParts(array $linkParts): void
61  {
62  $this->linkParts = $linkParts;
63  }
64 
65  public function ‪setContent(string $content): void
66  {
67  $this->content = $content;
68  }
69 
70  public function ‪setElements(array $elements): void
71  {
72  $this->elements = $elements;
73  }
74 
75  public function ‪addElements(array $elements)
76  {
77  $this->elements = array_replace_recursive($this->elements, $elements);
78  $this->‪isResolved = true;
79  }
80 
81  public function ‪isResolved(): bool
82  {
83  return ‪$this->isResolved;
84  }
85 }
‪TYPO3\CMS\Core\DataHandling\Event
Definition: AppendLinkHandlerElementsEvent.php:18