public function addTextArea($name, $label = NULL, $cols = NULL, $rows = NULL) { return $this[$name] = (new Controls\TextArea($label))->setAttribute('cols', $cols)->setAttribute('rows', $rows); }
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); }