Nette\Forms\Container::addTextArea PHP Метод

addTextArea() публичный Метод

Adds multi-line text input control to the form.
public addTextArea ( $name, $label = NULL, $cols = NULL, $rows = NULL ) : TextArea
Результат Nette\Forms\Controls\TextArea
    public function addTextArea($name, $label = NULL, $cols = NULL, $rows = NULL)
    {
        return $this[$name] = (new Controls\TextArea($label))->setAttribute('cols', $cols)->setAttribute('rows', $rows);
    }

Usage Example

Пример #1
0
 public function generateForm(Items\Base $item, Nette\Forms\Container &$formContainer, $name, $parentName, $togglingObject, array $userOptions = [])
 {
     $input = $formContainer->addTextArea($name, $name);
     $input->setOption('id', $parentName . '__' . $name);
     $input->setValue($item->getContent());
     if (!is_null($togglingObject)) {
         $togglingObject->toggle($input->getOption('id'));
     }
     $item->applyUserOptions($input, $userOptions);
 }
All Usage Examples Of Nette\Forms\Container::addTextArea