‪TYPO3CMS  10.4
PasswordViewHelper.php
Go to the documentation of this file.
1 <?php
2 
3 /*
4  * This file is part of the TYPO3 CMS project.
5  *
6  * It is free software; you can redistribute it and/or modify it under
7  * the terms of the GNU General Public License, either version 2
8  * of the License, or any later version.
9  *
10  * For the full copyright and license information, please read the
11  * LICENSE.txt file that was distributed with this source code.
12  *
13  * The TYPO3 project - inspiring people to share!
14  */
15 
17 
33 {
37  protected ‪$tagName = 'input';
38 
42  public function ‪initializeArguments()
43  {
44  parent::initializeArguments();
45  $this->registerTagAttribute(
46  'disabled',
47  'string',
48  'Specifies that the input element should be disabled when the page loads'
49  );
50  $this->registerTagAttribute(
51  'maxlength',
52  'int',
53  'The maxlength attribute of the input field (will not be validated)'
54  );
55  $this->registerTagAttribute('placeholder', 'string', 'The placeholder of the textfield');
56  $this->registerTagAttribute('readonly', 'string', 'The readonly attribute of the input field');
57  $this->registerTagAttribute('size', 'int', 'The size of the input field');
58  $this->registerArgument(
59  'errorClass',
60  'string',
61  'CSS class to set if there are errors for this ViewHelper',
62  false,
63  'f3-form-error'
64  );
65  $this->registerUniversalTagAttributes();
66  }
67 
73  public function ‪render()
74  {
75  $name = $this->‪getName();
78 
79  $this->tag->addAttribute('type', 'password');
80  $this->tag->addAttribute('name', $name);
81  $this->tag->addAttribute('value', $this->‪getValueAttribute());
82 
85 
86  return $this->tag->render();
87  }
88 }
‪TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormFieldViewHelper\setErrorClassAttribute
‪setErrorClassAttribute()
Definition: AbstractFormFieldViewHelper.php:331
‪TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormFieldViewHelper\setRespectSubmittedDataValue
‪setRespectSubmittedDataValue($respectSubmittedDataValue)
Definition: AbstractFormFieldViewHelper.php:77
‪TYPO3\CMS\Fluid\ViewHelpers\Form
Definition: AbstractFormFieldViewHelper.php:16
‪TYPO3\CMS\Fluid\ViewHelpers\Form\PasswordViewHelper
Definition: PasswordViewHelper.php:33
‪TYPO3\CMS\Fluid\ViewHelpers\Form\PasswordViewHelper\render
‪string render()
Definition: PasswordViewHelper.php:72
‪TYPO3\CMS\Fluid\ViewHelpers\Form\PasswordViewHelper\initializeArguments
‪initializeArguments()
Definition: PasswordViewHelper.php:41
‪TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormViewHelper\registerFieldNameForFormTokenGeneration
‪registerFieldNameForFormTokenGeneration($fieldName)
Definition: AbstractFormViewHelper.php:106
‪TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormFieldViewHelper
Definition: AbstractFormFieldViewHelper.php:30
‪TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormFieldViewHelper\addAdditionalIdentityPropertiesIfNeeded
‪addAdditionalIdentityPropertiesIfNeeded()
Definition: AbstractFormFieldViewHelper.php:243
‪TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormFieldViewHelper\getName
‪string getName()
Definition: AbstractFormFieldViewHelper.php:90
‪TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormFieldViewHelper\getValueAttribute
‪mixed getValueAttribute()
Definition: AbstractFormFieldViewHelper.php:151
‪TYPO3\CMS\Fluid\ViewHelpers\Form\PasswordViewHelper\$tagName
‪string $tagName
Definition: PasswordViewHelper.php:36