‪TYPO3CMS  ‪main
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 ‪$hasChildren = false;
39 
43  private ‪$sortValue;
44 
50  public function ‪setSelectable(‪$selectable)
51  {
52  $this->selectable = ‪$selectable;
53  }
54 
60  public function ‪getSelectable()
61  {
62  return ‪$this->selectable;
63  }
64 
70  public function ‪setSelected(‪$selected)
71  {
72  $this->selected = ‪$selected;
73  }
74 
80  public function ‪getSelected()
81  {
82  return ‪$this->selected;
83  }
84 
90  public function ‪hasChildren()
91  {
92  return ‪$this->hasChildren;
93  }
94 
100  public function ‪setHasChildren($value)
101  {
102  $this->‪hasChildren = (bool)$value;
103  }
104 
116  public function ‪compareTo($other)
117  {
118  if ($this->‪equals($other)) {
119  return 0;
120  }
121  return $this->sortValue > $other->getSortValue() ? 1 : -1;
122  }
123 
129  public function ‪getSortValue()
130  {
131  return ‪$this->sortValue;
132  }
133 
139  public function ‪setSortValue(‪$sortValue)
140  {
141  $this->sortValue = ‪$sortValue;
142  }
143 }
‪TYPO3\CMS\Core\Tree\TableConfiguration\DatabaseTreeNode\setSelectable
‪setSelectable($selectable)
Definition: DatabaseTreeNode.php:46
‪TYPO3\CMS\Backend\Tree\TreeRepresentationNode
Definition: TreeRepresentationNode.php:24
‪TYPO3\CMS\Core\Tree\TableConfiguration\DatabaseTreeNode\setSelected
‪setSelected($selected)
Definition: DatabaseTreeNode.php:66
‪TYPO3\CMS\Core\Tree\TableConfiguration\DatabaseTreeNode
Definition: DatabaseTreeNode.php:24
‪TYPO3\CMS\Core\Tree\TableConfiguration\DatabaseTreeNode\setHasChildren
‪setHasChildren($value)
Definition: DatabaseTreeNode.php:96
‪TYPO3\CMS\Core\Tree\TableConfiguration\DatabaseTreeNode\getSelectable
‪bool getSelectable()
Definition: DatabaseTreeNode.php:56
‪TYPO3\CMS\Core\Tree\TableConfiguration\DatabaseTreeNode\setSortValue
‪setSortValue($sortValue)
Definition: DatabaseTreeNode.php:135
‪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:76
‪TYPO3\CMS\Core\Tree\TableConfiguration\DatabaseTreeNode\compareTo
‪int compareTo($other)
Definition: DatabaseTreeNode.php:112
‪TYPO3\CMS\Core\Tree\TableConfiguration\DatabaseTreeNode\hasChildren
‪bool hasChildren()
Definition: DatabaseTreeNode.php:86
‪TYPO3\CMS\Backend\Tree\TreeNode\equals
‪bool equals(TreeNode $other)
Definition: TreeNode.php:151
‪TYPO3\CMS\Core\Tree\TableConfiguration\DatabaseTreeNode\getSortValue
‪mixed getSortValue()
Definition: DatabaseTreeNode.php:125
‪TYPO3\CMS\Core\Tree\TableConfiguration\DatabaseTreeNode\$sortValue
‪mixed $sortValue
Definition: DatabaseTreeNode.php:39
‪TYPO3\CMS\Core\Tree\TableConfiguration\DatabaseTreeNode\$selectable
‪bool $selectable
Definition: DatabaseTreeNode.php:27
‪TYPO3\CMS\Core\Tree\TableConfiguration\DatabaseTreeNode\$hasChildren
‪bool $hasChildren
Definition: DatabaseTreeNode.php:35