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

__construct() public method

public __construct ( $persistentValue = NULL )
    public function __construct($persistentValue = NULL)
    {
        parent::__construct();
        $this->control->type = 'hidden';
        $this->setOption('type', 'hidden');
        if ($persistentValue !== NULL) {
            $this->unmonitor(Nette\Forms\Form::class);
            $this->persistValue = TRUE;
            $this->value = (string) $persistentValue;
        }
    }

Usage Example

コード例 #1
0
ファイル: CsrfProtection.php プロジェクト: jurasm2/nette
 /**
  * @param string
  * @param int
  */
 public function __construct($message)
 {
     parent::__construct();
     $this->setOmitted()->addRule(self::PROTECTION, $message);
     $this->monitor('Nette\\Application\\UI\\Presenter');
 }
All Usage Examples Of Nette\Forms\Controls\HiddenField::__construct