TYPO3 CMS  TYPO3_6-2
TreeRepresentationNode.php
Go to the documentation of this file.
1 <?php
2 namespace TYPO3\CMS\Backend\Tree;
3 
23 
29  protected $label = '';
30 
36  protected $type = '';
37 
43  protected $class = '';
44 
50  protected $icon = '';
51 
57  protected $callbackAction = '';
58 
63  public function setClass($class) {
64  $this->class = $class;
65  }
66 
70  public function getClass() {
71  return $this->class;
72  }
73 
78  public function setIcon($icon) {
79  $this->icon = $icon;
80  }
81 
85  public function getIcon() {
86  return $this->icon;
87  }
88 
92  public function setLabel($label) {
93  $this->label = $label;
94  }
95 
99  public function getLabel() {
100  return $this->label;
101  }
102 
107  public function setType($type) {
108  $this->type = $type;
109  }
110 
114  public function getType() {
115  return $this->type;
116  }
117 
125  $this->callbackAction = $callbackAction;
126  }
127 
133  public function getCallbackAction() {
134  return $this->callbackAction;
135  }
136 
143  public function toArray($addChildNodes = TRUE) {
144  $arrayRepresentation = parent::toArray();
145  $arrayRepresentation = array_merge($arrayRepresentation, array(
146  'label' => $this->label,
147  'type' => $this->type,
148  'class' => $this->class,
149  'icon' => $this->icon,
150  'callbackAction' => $this->callbackAction
151  ));
152  return $arrayRepresentation;
153  }
154 
161  public function dataFromArray($data) {
162  parent::dataFromArray($data);
163  $this->setLabel($data['label']);
164  $this->setType($data['type']);
165  $this->setClass($data['class']);
166  $this->setIcon($data['icon']);
167  $this->setCallbackAction($data['callbackAction']);
168  }
169 
170 }