‪TYPO3CMS  ‪main
PageTreeItem.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 
23 final readonly class ‪PageTreeItem implements \JsonSerializable
24 {
25  public function ‪__construct(
26  public ‪TreeItem $item,
27  public int $doktype,
28  public string $nameSourceField,
29  public int $workspaceId,
30  public bool $locked,
31  public bool $stopPageTree,
32  public int $mountPoint,
33  ) {}
34 
35  public function ‪jsonSerialize(): array
36  {
37  return [
38  'type' => 'PageTreeItem',
39  ...$this->item->jsonSerialize(),
40  'doktype' => $this->doktype,
41  'nameSourceField' => $this->nameSourceField,
42  'workspaceId' => $this->workspaceId,
43  'locked' => $this->locked,
44  'stopPageTree' => $this->stopPageTree,
45  'mountPoint' => $this->mountPoint,
46  ];
47  }
48 }
‪TYPO3\CMS\Backend\Dto\Tree\PageTreeItem\__construct
‪__construct(public TreeItem $item, public int $doktype, public string $nameSourceField, public int $workspaceId, public bool $locked, public bool $stopPageTree, public int $mountPoint,)
Definition: PageTreeItem.php:25
‪TYPO3\CMS\Backend\Dto\Tree
Definition: FileTreeItem.php:18
‪TYPO3\CMS\Backend\Dto\Tree\PageTreeItem\jsonSerialize
‪jsonSerialize()
Definition: PageTreeItem.php:35
‪TYPO3\CMS\Backend\Dto\Tree\TreeItem
Definition: TreeItem.php:27
‪TYPO3\CMS\Backend\Dto\Tree\PageTreeItem
Definition: PageTreeItem.php:24