rtForm::generate_textarea PHP Method

generate_textarea() protected method

Generate rtmedia html textarea in admin options.
protected generate_textarea ( $attributes ) : string
$attributes
return string
        protected function generate_textarea($attributes)
        {
            $element = 'rtTextarea';
            if (is_array($attributes)) {
                $html = '<textarea ';
                $html .= $this->processAttributes($element, $attributes);
                $html .= '>';
                $html .= esc_html(isset($attributes['value']) ? $attributes['value'] : '');
                $html .= '</textarea>';
                if (isset($attributes['label'])) {
                    if (isset($attributes['labelClass'])) {
                        $html = $this->enclose_label($element, $html, $attributes['label'], $attributes['labelClass']);
                    } else {
                        $html = $this->enclose_label($element, $html, $attributes['label']);
                    }
                }
                if (isset($attributes['show_desc']) && $attributes['show_desc']) {
                    $html .= $this->generate_element_desc($attributes);
                }
                return $html;
            } else {
                throw new rtFormInvalidArgumentsException('attributes');
            }
        }