‪TYPO3CMS  10.4
DatabaseTreeNode.php
Go to the documentation of this file.
1 <?php
2 
3 /*
4  * This file is part of the TYPO3 CMS project.
5  *
6  * It is free software; you can redistribute it and/or modify it under
7  * the terms of the GNU General Public License, either version 2
8  * of the License, or any later version.
9  *
10  * For the full copyright and license information, please read the
11  * LICENSE.txt file that was distributed with this source code.
12  *
13  * The TYPO3 project - inspiring people to share!
14  */
15 
17 
19 
24 {
28  protected ‪$selectable;
29 
33  protected ‪$selected = false;
34 
38  protected ‪$expanded = true;
39 
43  protected ‪$hasChildren = false;
44 
48  private ‪$sortValue;
49 
55  public function ‪setExpanded(‪$expanded)
56  {
57  $this->expanded = ‪$expanded;
58  }
59 
65  public function ‪getExpanded()
66  {
67  return ‪$this->expanded;
68  }
69 
75  public function ‪setSelectable(‪$selectable)
76  {
77  $this->selectable = ‪$selectable;
78  }
79 
85  public function ‪getSelectable()
86  {
87  return ‪$this->selectable;
88  }
89 
95  public function ‪setSelected(‪$selected)
96  {
97  $this->selected = ‪$selected;
98  }
99 
105  public function ‪getSelected()
106  {
107  return ‪$this->selected;
108  }
109 
115  public function ‪hasChildren()
116  {
117  return ‪$this->hasChildren;
118  }
119 
125  public function ‪setHasChildren($value)
126  {
127  $this->‪hasChildren = (bool)$value;
128  }
129 
141  public function ‪compareTo($other)
142  {
143  if ($this->‪equals($other)) {
144  return 0;
145  }
146  return $this->sortValue > $other->getSortValue() ? 1 : -1;
147  }
148 
154  public function ‪getSortValue()
155  {
156  return ‪$this->sortValue;
157  }
158 
164  public function ‪setSortValue(‪$sortValue)
165  {
166  $this->sortValue = ‪$sortValue;
167  }
168 }
‪TYPO3\CMS\Backend\Tree\TreeNode\equals
‪bool equals(\TYPO3\CMS\Backend\Tree\TreeNode $other)
Definition: TreeNode.php:149
‪TYPO3\CMS\Core\Tree\TableConfiguration\DatabaseTreeNode\setSelectable
‪setSelectable($selectable)
Definition: DatabaseTreeNode.php:70
‪TYPO3\CMS\Backend\Tree\TreeRepresentationNode
Definition: TreeRepresentationNode.php:24
‪TYPO3\CMS\Core\Tree\TableConfiguration\DatabaseTreeNode\setSelected
‪setSelected($selected)
Definition: DatabaseTreeNode.php:90
‪TYPO3\CMS\Core\Tree\TableConfiguration\DatabaseTreeNode
Definition: DatabaseTreeNode.php:24
‪TYPO3\CMS\Core\Tree\TableConfiguration\DatabaseTreeNode\$expanded
‪bool $expanded
Definition: DatabaseTreeNode.php:35
‪TYPO3\CMS\Core\Tree\TableConfiguration\DatabaseTreeNode\setHasChildren
‪setHasChildren($value)
Definition: DatabaseTreeNode.php:120
‪TYPO3\CMS\Core\Tree\TableConfiguration\DatabaseTreeNode\getSelectable
‪bool getSelectable()
Definition: DatabaseTreeNode.php:80
‪TYPO3\CMS\Core\Tree\TableConfiguration\DatabaseTreeNode\setSortValue
‪setSortValue($sortValue)
Definition: DatabaseTreeNode.php:159
‪TYPO3\CMS\Core\Tree\TableConfiguration\DatabaseTreeNode\$selected
‪bool $selected
Definition: DatabaseTreeNode.php:31
‪TYPO3\CMS\Core\Tree\TableConfiguration
Definition: AbstractTableConfigurationTreeDataProvider.php:16
‪TYPO3\CMS\Core\Tree\TableConfiguration\DatabaseTreeNode\getSelected
‪bool getSelected()
Definition: DatabaseTreeNode.php:100
‪TYPO3\CMS\Core\Tree\TableConfiguration\DatabaseTreeNode\compareTo
‪int compareTo($other)
Definition: DatabaseTreeNode.php:136
‪TYPO3\CMS\Core\Tree\TableConfiguration\DatabaseTreeNode\hasChildren
‪bool hasChildren()
Definition: DatabaseTreeNode.php:110
‪TYPO3\CMS\Core\Tree\TableConfiguration\DatabaseTreeNode\getSortValue
‪mixed getSortValue()
Definition: DatabaseTreeNode.php:149
‪TYPO3\CMS\Core\Tree\TableConfiguration\DatabaseTreeNode\$sortValue
‪mixed $sortValue
Definition: DatabaseTreeNode.php:43
‪TYPO3\CMS\Core\Tree\TableConfiguration\DatabaseTreeNode\$selectable
‪bool $selectable
Definition: DatabaseTreeNode.php:27
‪TYPO3\CMS\Core\Tree\TableConfiguration\DatabaseTreeNode\getExpanded
‪bool getExpanded()
Definition: DatabaseTreeNode.php:60
‪TYPO3\CMS\Core\Tree\TableConfiguration\DatabaseTreeNode\setExpanded
‪setExpanded($expanded)
Definition: DatabaseTreeNode.php:50
‪TYPO3\CMS\Core\Tree\TableConfiguration\DatabaseTreeNode\$hasChildren
‪bool $hasChildren
Definition: DatabaseTreeNode.php:39