TYPO3 CMS  TYPO3_7-6
SubmitViewHelper.php
Go to the documentation of this file.
1 <?php
2 
4 
5 /* *
6  * This script is backported from the TYPO3 Flow package "TYPO3.Fluid". *
7  * *
8  * It is free software; you can redistribute it and/or modify it under *
9  * the terms of the GNU Lesser General Public License, either version 3 *
10  * of the License, or (at your option) any later version. *
11  * *
12  * The TYPO3 project - inspiring people to share! *
13  * */
14 
37 {
41  protected $tagName = 'input';
42 
49  public function initializeArguments()
50  {
51  parent::initializeArguments();
52  $this->registerTagAttribute(
53  'disabled', 'string', 'Specifies that the input element should be disabled when the page loads'
54  );
56  }
57 
64  public function render()
65  {
66  $name = $this->getName();
68 
69  $this->tag->addAttribute('type', 'submit');
70  $this->tag->addAttribute('value', $this->getValueAttribute());
71  if (!empty($name)) {
72  $this->tag->addAttribute('name', $name);
73  }
74 
75  return $this->tag->render();
76  }
77 }
registerTagAttribute($name, $type, $description, $required=false, $default=null)