TYPO3 CMS  TYPO3_6-2
AdditionalAdditionalElement.php
Go to the documentation of this file.
1 <?php
3 
23 
29  protected $additional = array();
30 
39  public function addAdditional($class, $type, $value) {
40  $class = strtolower((string) $class);
41  $className = 'TYPO3\\CMS\\Form\\Domain\\Model\\Additional\\' . ucfirst($class) . 'AdditionalElement';
42  $this->additional[$class] = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance($className, $type, $value);
43  return $this;
44  }
45 
51  public function getAdditional() {
52  return $this->additional;
53  }
54 
61  public function getAdditionalObjectByKey($key) {
62  return $this->additional[$key];
63  }
64 
72  public function additionalIsSet($key) {
73  return isset($this->additional[$key]);
74  }
75 
83  public function setLayout($key, $layout) {
84  $this->getAdditionalObjectByKey($key)->setLayout($layout);
85  }
86 
93  public function getValue($key) {
94  return $this->getAdditionalObjectByKey($key)->getValue();
95  }
96 
97 }