If you set the "property" attribute to the name of the property to resolve from the object, this class will automatically set the name and value of a form element.
Inheritance: extends AbstractFormViewHelper
 /**
  * @return void
  * @api
  */
 public function initializeArguments()
 {
     parent::initializeArguments();
     $this->registerTagAttribute('disabled', 'string', 'Specifies that the input element should be disabled when the page loads');
     $this->registerArgument('errorClass', 'string', 'CSS class to set if there are errors for this view helper', false, 'f3-form-error');
     $this->registerArgument('collection', 'string', 'Name of the resource collection this file should be uploaded to', false, '');
     $this->registerUniversalTagAttributes();
 }
Example #2
0
 /**
  * Initialize the arguments.
  *
  * @return void
  * @api
  */
 public function initializeArguments()
 {
     parent::initializeArguments();
     $this->registerTagAttribute('size', 'int', 'The size of the input field');
     $this->registerTagAttribute('placeholder', 'string', 'Specifies a short hint that describes the expected value of an input element');
     $this->registerArgument('errorClass', 'string', 'CSS class to set if there are errors for this view helper', false, 'f3-form-error');
     $this->registerArgument('initialDate', 'string', 'Initial date (@see http://www.php.net/manual/en/datetime.formats.php for supported formats)');
     $this->registerUniversalTagAttributes();
 }
 /**
  * Get the name of this form element, without prefix.
  *
  * This is done to prevent the extra __identity being added for objects
  * since it leading to property mapping errors and it works without it.
  *
  * @return string name
  */
 protected function getNameWithoutPrefix()
 {
     $name = parent::getNameWithoutPrefix();
     return str_replace('[__identity]', '', $name);
 }
Example #4
0
 /**
  * Initialize the arguments.
  *
  * @return void
  * @author Sebastian Kurfürst <*****@*****.**>
  * @api
  */
 public function initializeArguments()
 {
     parent::initializeArguments();
 }
 /**
  * Initialize arguments.
  *
  * @return void
  * @api
  */
 public function initializeArguments()
 {
     parent::initializeArguments();
     $this->registerUniversalTagAttributes();
     $this->registerTagAttribute('multiple', 'string', 'if set, multiple select field');
     $this->registerTagAttribute('size', 'string', 'Size of input field');
     $this->registerTagAttribute('disabled', 'string', 'Specifies that the input element should be disabled when the page loads');
     $this->registerArgument('options', 'array', 'Associative array with internal IDs as key, and the values are displayed in the select box', true);
     $this->registerArgument('optionValueField', 'string', 'If specified, will call the appropriate getter on each object to determine the value.');
     $this->registerArgument('optionLabelField', 'string', 'If specified, will call the appropriate getter on each object to determine the label.');
     $this->registerArgument('sortByOptionLabel', 'boolean', 'If true, List will be sorted by label.', false, false);
     $this->registerArgument('selectAllByDefault', 'boolean', 'If specified options are selected if none was set before.', false, false);
     $this->registerArgument('errorClass', 'string', 'CSS class to set if there are errors for this ViewHelper', false, 'f3-form-error');
     $this->registerArgument('translate', 'array', 'Configures translation of ViewHelper output.');
     $this->registerArgument('prependOptionLabel', 'string', 'If specified, will provide an option at first position with the specified label.');
     $this->registerArgument('prependOptionValue', 'string', 'If specified, will provide an option at first position with the specified value. This argument is only respected if prependOptionLabel is set.');
 }