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

getControl() public method

Generates control's HTML element.
public getControl ( ) : Nette\Utils\Html | string
return Nette\Utils\Html | string
    public function getControl()
    {
        $this->setOption('rendered', TRUE);
        $el = clone $this->control;
        return $el->addAttributes(['name' => $this->getHtmlName(), 'id' => $this->getHtmlId(), 'required' => $this->isRequired(), 'disabled' => $this->isDisabled(), 'data-nette-rules' => Nette\Forms\Helpers::exportRules($this->rules) ?: NULL]);
    }

Usage Example

Esempio n. 1
0
 public function getControl()
 {
     $container = Html::el();
     $container->add($this->wrappedControl->getControl());
     $container->add($this->applyButton->getControl($this->caption));
     return $container;
 }
All Usage Examples Of Nette\Forms\Controls\BaseControl::getControl