‪TYPO3CMS  9.5
DatabaseTreeNode.php
Go to the documentation of this file.
1 <?php
3 
4 /*
5  * This file is part of the TYPO3 CMS project.
6  *
7  * It is free software; you can redistribute it and/or modify it under
8  * the terms of the GNU General Public License, either version 2
9  * of the License, or any later version.
10  *
11  * For the full copyright and license information, please read the
12  * LICENSE.txt file that was distributed with this source code.
13  *
14  * The TYPO3 project - inspiring people to share!
15  */
16 
21 {
25  protected ‪$selectable;
26 
30  protected ‪$selected = false;
31 
35  protected ‪$expanded = true;
36 
40  protected ‪$hasChildren = false;
41 
45  private ‪$sortValue;
46 
52  public function ‪setExpanded(‪$expanded)
53  {
54  $this->expanded = ‪$expanded;
55  }
56 
62  public function ‪getExpanded()
63  {
64  return ‪$this->expanded;
65  }
66 
72  public function ‪setSelectable(‪$selectable)
73  {
74  $this->selectable = ‪$selectable;
75  }
76 
82  public function ‪getSelectable()
83  {
84  return ‪$this->selectable;
85  }
86 
92  public function ‪setSelected(‪$selected)
93  {
94  $this->selected = ‪$selected;
95  }
96 
102  public function ‪getSelected()
103  {
104  return ‪$this->selected;
105  }
106 
112  public function ‪hasChildren()
113  {
114  return ‪$this->hasChildren;
115  }
116 
122  public function ‪setHasChildren($value)
123  {
124  $this->‪hasChildren = (bool)$value;
125  }
126 
138  public function ‪compareTo($other)
139  {
140  if ($this->‪equals($other)) {
141  return 0;
142  }
143  return $this->sortValue > $other->getSortValue() ? 1 : -1;
144  }
145 
151  public function ‪getSortValue()
152  {
153  return ‪$this->sortValue;
154  }
155 
161  public function ‪setSortValue(‪$sortValue)
162  {
163  $this->sortValue = ‪$sortValue;
164  }
165 }
‪TYPO3\CMS\Backend\Tree\TreeNode\equals
‪bool equals(\TYPO3\CMS\Backend\Tree\TreeNode $other)
Definition: TreeNode.php:147
‪TYPO3\CMS\Core\Tree\TableConfiguration\DatabaseTreeNode\setSelectable
‪setSelectable($selectable)
Definition: DatabaseTreeNode.php:67
‪TYPO3\CMS\Backend\Tree\TreeRepresentationNode
Definition: TreeRepresentationNode.php:22
‪TYPO3\CMS\Core\Tree\TableConfiguration\DatabaseTreeNode\setSelected
‪setSelected($selected)
Definition: DatabaseTreeNode.php:87
‪TYPO3\CMS\Core\Tree\TableConfiguration\DatabaseTreeNode
Definition: DatabaseTreeNode.php:21
‪TYPO3\CMS\Core\Tree\TableConfiguration\DatabaseTreeNode\$expanded
‪bool $expanded
Definition: DatabaseTreeNode.php:32
‪TYPO3\CMS\Core\Tree\TableConfiguration\DatabaseTreeNode\setHasChildren
‪setHasChildren($value)
Definition: DatabaseTreeNode.php:117
‪TYPO3\CMS\Core\Tree\TableConfiguration\DatabaseTreeNode\getSelectable
‪bool getSelectable()
Definition: DatabaseTreeNode.php:77
‪TYPO3\CMS\Core\Tree\TableConfiguration\DatabaseTreeNode\setSortValue
‪setSortValue($sortValue)
Definition: DatabaseTreeNode.php:156
‪TYPO3\CMS\Core\Tree\TableConfiguration\DatabaseTreeNode\$selected
‪bool $selected
Definition: DatabaseTreeNode.php:28
‪TYPO3\CMS\Core\Tree\TableConfiguration
Definition: AbstractTableConfigurationTreeDataProvider.php:2
‪TYPO3\CMS\Core\Tree\TableConfiguration\DatabaseTreeNode\getSelected
‪bool getSelected()
Definition: DatabaseTreeNode.php:97
‪TYPO3\CMS\Core\Tree\TableConfiguration\DatabaseTreeNode\compareTo
‪int compareTo($other)
Definition: DatabaseTreeNode.php:133
‪TYPO3\CMS\Core\Tree\TableConfiguration\DatabaseTreeNode\hasChildren
‪bool hasChildren()
Definition: DatabaseTreeNode.php:107
‪TYPO3\CMS\Core\Tree\TableConfiguration\DatabaseTreeNode\getSortValue
‪mixed getSortValue()
Definition: DatabaseTreeNode.php:146
‪TYPO3\CMS\Core\Tree\TableConfiguration\DatabaseTreeNode\$sortValue
‪mixed $sortValue
Definition: DatabaseTreeNode.php:40
‪TYPO3\CMS\Core\Tree\TableConfiguration\DatabaseTreeNode\$selectable
‪bool $selectable
Definition: DatabaseTreeNode.php:24
‪TYPO3\CMS\Core\Tree\TableConfiguration\DatabaseTreeNode\getExpanded
‪bool getExpanded()
Definition: DatabaseTreeNode.php:57
‪TYPO3\CMS\Core\Tree\TableConfiguration\DatabaseTreeNode\setExpanded
‪setExpanded($expanded)
Definition: DatabaseTreeNode.php:47
‪TYPO3\CMS\Core\Tree\TableConfiguration\DatabaseTreeNode\$hasChildren
‪bool $hasChildren
Definition: DatabaseTreeNode.php:36