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

getControl() public method

Generates control's HTML element.
public getControl ( ) : Nette\Utils\Html
return Nette\Utils\Html
    public function getControl()
    {
        $this->setOption('rendered', TRUE);
        $el = clone $this->control;
        return $el->addAttributes(['name' => $this->getHtmlName(), 'disabled' => $this->isDisabled(), 'value' => $this->value]);
    }

Usage Example

Ejemplo n.º 1
0
 /**
  * Generates control's HTML element.
  *
  * @return Nette\Utils\Html
  */
 public function getControl()
 {
     return parent::getControl()->value($this->getToken());
 }