Nette\Forms\Form::__construct PHP Method

__construct() public method

Form constructor.
public __construct ( $name = NULL )
    public function __construct($name = NULL)
    {
        parent::__construct();
        if ($name !== NULL) {
            $this->getElementPrototype()->id = 'frm-' . $name;
            $tracker = new Controls\HiddenField($name);
            $tracker->setOmitted();
            $this[self::TRACKER_ID] = $tracker;
            $this->setParent(NULL, $name);
        }
    }

Usage Example

Example #1
0
 /**
  * Application form constructor.
  */
 public function __construct(Nette\ComponentModel\IContainer $parent = NULL, $name = NULL)
 {
     parent::__construct();
     if ($parent !== NULL) {
         $parent->addComponent($this, $name);
     }
 }
All Usage Examples Of Nette\Forms\Form::__construct