rtForm::generate_hidden PHP Method

generate_hidden() protected method

Generate rtmedia html hidden field in admin options.
protected generate_hidden ( $attributes ) : string
$attributes
return string
        protected function generate_hidden($attributes)
        {
            $element = 'rtHidden';
            if (is_array($attributes)) {
                /* Starting the input tag */
                $html = '<input type="hidden" ';
                /* generating attributes */
                $html .= $this->processAttributes($element, $attributes);
                /* ending the tag */
                $html .= ' />';
                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');
            }
        }