Nette\Forms\Controls\TextInput::__construct PHP Method

__construct() public method

public __construct ( $label = NULL, $maxLength = NULL )
    public function __construct($label = NULL, $maxLength = NULL)
    {
        parent::__construct($label);
        $this->control->maxlength = $maxLength;
        $this->setOption('type', 'text');
    }

Usage Example

Beispiel #1
0
 /**
  * @param string $label
  * @return Forms\Controls\DatePicker
  */
 public function __construct($label = NULL)
 {
     parent::__construct($label);
     $this->addCondition(Form::FILLED)->addRule(function ($control) {
         return $control->getValue() instanceof DateTime;
     }, 'brosland.forms.datePicker.invalidDate');
 }
All Usage Examples Of Nette\Forms\Controls\TextInput::__construct