/** * TextArea element. * * @param string $name Element name. * @param string|null $label Element label. * @param string|null $description Element description. * @param mixed|null $value Element value. * @param array $options Element options. * @param array $attributes Element attributes. * * @return $this */ public function addTextArea($name, $label = null, $description = null, $value = null, array $options = [], array $attributes = []) { $element = new Form\Element\TextArea($name, $options, $attributes); if (!$label) { $label = ucfirst($name); } $element->setOption('label', $label)->setOption('description', $description)->setValue($value); $this->add($element); return $this; }
/** * Render element. * * @return string */ public function render() { $this->getDI()->get('assets')->addJs('assets/js/core/widgets/ckeditor.js'); return parent::render(); }