TYPO3 CMS  TYPO3_7-6
Element.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 
19 
24 class Element extends AbstractEntity
25 {
32 
38  protected $childElements;
39 
45  protected $elementCounter;
46 
52  protected $elementType;
53 
60 
66  protected $htmlAttributes;
67 
73  protected $id;
74 
81  protected $layout;
82 
89 
95  protected $name;
96 
102  protected $parentElement;
103 
109  protected $partialPath;
110 
116  protected $showElement;
117 
123  protected $themeName;
124 
128  public function __construct()
129  {
130  $this->initStorageObjects();
131  }
132 
138  protected function initStorageObjects()
139  {
140  $this->childElements = new ObjectStorage();
141  }
142 
148  public function getAdditionalArguments()
149  {
151  }
152 
160  {
161  $this->additionalArguments = $additionalArguments;
162  }
163 
170  public function getAdditionalArgument($key = '')
171  {
172  return $this->additionalArguments[$key];
173  }
174 
182  public function setAdditionalArgument($key = '', $value = null)
183  {
184  $this->additionalArguments[$key] = $value;
185  }
186 
193  public function addChildElement(Element $element)
194  {
195  $this->childElements->attach($element);
196  }
197 
203  public function getChildElements()
204  {
205  return $this->childElements;
206  }
207 
215  {
216  $this->childElements = $childElements;
217  }
218 
224  public function getElementCounter()
225  {
226  return $this->elementCounter;
227  }
228 
235  public function setElementCounter($elementCounter = 0)
236  {
237  $this->elementCounter = $elementCounter;
238  }
239 
245  public function getElementType()
246  {
247  return $this->elementType;
248  }
249 
255  public function getElementTypeLowerCase()
256  {
257  return strtolower($this->elementType);
258  }
259 
266  public function setElementType($elementType)
267  {
268  $this->elementType = (string)$elementType;
269  }
270 
276  public function getValidationErrorMessages()
277  {
279  }
280 
288  {
289  $this->validationErrorMessages = $validationErrorMessages;
290  }
291 
297  public function getHtmlAttributes()
298  {
299  return $this->htmlAttributes;
300  }
301 
308  public function setHtmlAttributes($htmlAttributes = [])
309  {
310  $this->htmlAttributes = $htmlAttributes;
311  }
312 
319  public function removeHtmlAttribute($key = '')
320  {
321  unset($this->htmlAttributes[$key]);
322  }
323 
330  public function getHtmlAttribute($key = '')
331  {
332  return $this->htmlAttributes[$key];
333  }
334 
342  public function setHtmlAttribute($key = '', $value = null)
343  {
344  $this->htmlAttributes[$key] = $value;
345  }
346 
352  public function getId()
353  {
354  return $this->id;
355  }
356 
363  public function setId($id)
364  {
365  $this->id = (string)$id;
366  }
367 
373  public function getLayout()
374  {
375  return $this->layout;
376  }
377 
384  public function setLayout(array $layout)
385  {
386  $this->layout = $layout;
387  }
388 
395  {
397  }
398 
406  {
407  $this->mandatoryValidationMessages = $mandatoryValidationMessages;
408  }
409 
415  public function getName()
416  {
417  return $this->name;
418  }
419 
426  public function setName($name)
427  {
428  $this->name = (string)$name;
429  }
430 
436  public function getParentElement()
437  {
438  return $this->parentElement;
439  }
440 
448  {
449  $this->parentElement = $parentElement;
450  }
451 
457  public function getPartialPath()
458  {
459  return $this->partialPath;
460  }
461 
468  public function setPartialPath($partialPath)
469  {
470  $this->partialPath = (string)$partialPath;
471  }
472 
478  public function getShowElement()
479  {
480  return $this->showElement;
481  }
482 
489  public function setShowElement($showElement = false)
490  {
491  $this->showElement = $showElement;
492  }
493 
500  public function setThemeName($themeName = 'Default')
501  {
502  $this->themeName = $themeName;
503  }
504 
510  public function getThemeName()
511  {
512  return $this->themeName;
513  }
514 }
addChildElement(Element $element)
Definition: Element.php:193
setChildElements(ObjectStorage $childElements)
Definition: Element.php:214
setParentElement(Element $parentElement)
Definition: Element.php:447
setValidationErrorMessages(array $validationErrorMessages)
Definition: Element.php:287
setThemeName($themeName='Default')
Definition: Element.php:500
setShowElement($showElement=false)
Definition: Element.php:489
setElementCounter($elementCounter=0)
Definition: Element.php:235
setHtmlAttributes($htmlAttributes=[])
Definition: Element.php:308
setHtmlAttribute($key='', $value=null)
Definition: Element.php:342
setAdditionalArguments($additionalArguments=[])
Definition: Element.php:159
setMandatoryValidationMessages(array $mandatoryValidationMessages)
Definition: Element.php:405
setAdditionalArgument($key='', $value=null)
Definition: Element.php:182