TYPO3 CMS  TYPO3_6-2
FileuploadElementView.php
Go to the documentation of this file.
1 <?php
3 
23 
27  protected $model;
28 
35  public function __construct(\TYPO3\CMS\Form\Domain\Model\Element\FileuploadElement $model, $spaces) {
36  parent::__construct($model, $spaces);
37  }
38 
42  public function render() {
43  $content = $this->getLabel() . ': ' . $this->model->getValue();
44  return str_repeat(chr(32), $this->spaces) . $content;
45  }
46 
50  protected function getLabel() {
51  if ($this->model->additionalIsSet('label')) {
52  $label = $this->model->getAdditionalValue('label');
53  } else {
54  $label = $this->model->getAttributeValue('name');
55  }
56  return $label;
57  }
58 
59 }
__construct(\TYPO3\CMS\Form\Domain\Model\Element\FileuploadElement $model, $spaces)