TYPO3 CMS  TYPO3_6-2
OptionElementView.php
Go to the documentation of this file.
1 <?php
3 
23 
30  public function __construct(\TYPO3\CMS\Form\Domain\Model\Element\OptionElement $model, $spaces) {
31  parent::__construct($model, $spaces);
32  }
33 
37  public function render() {
38  $data = $this->getData();
39  if ($data != '') {
40  return str_repeat(chr(32), $this->spaces) . $data;
41  }
42  }
43 
47  protected function getData() {
48  $value = '';
49  if (array_key_exists('selected', $this->model->getAllowedAttributes()) && $this->model->hasAttribute('selected')) {
50  $value = $this->model->getData();
51  }
52  return $value;
53  }
54 
55 }
__construct(\TYPO3\CMS\Form\Domain\Model\Element\OptionElement $model, $spaces)