@param \Magento\Framework\Data\Form\Element\AbstractElement $element

@return string
555447
public function _getElementHtml(
        \Magento\Framework\Data\Form\Element\AbstractElement $element
    ) {
        // Use Varien text element as a basis
        $input = $this->text;

        // Set data from config element on Varien text element
        $input->setForm($element->getForm())
            ->setElement($element)
            ->setValue($element->getValue())
            ->setHtmlId($element->getHtmlId())
            ->setClass('ddg-colpicker')
            ->setName($element->getName());

        // Inject updated Varien text element HTML in our current HTML
        $html = $input->getHtml();

        return $html;
    }
911077
public function content(Form\Element\Content $element)
    {

        if ($element->isFullWith()) {
            $html = '<div class="col-md-12">' . $element->getValue() . '</div>';
        } else {
            $html = '<label class="col-md-3 control-label">' . $element->getLabel() . '</label>';
            $html .= '<div class="col-md-9">' . $element->getValue() . '</div>';
        }

        $class = Style::FORM_GROUP_CLASS;
        return html('div', compact('class'), $html);
    }
1150676
function getElementType($element)
     {
         if (isset($this->_elementIndex[$element])) {
             return $this->_elements[$this->_elementIndex[$element]]->getType();
         }
         return false;
     }
844821
protected function getMethodNameForClass(Element $element)
    {
        // if a method exists for this element, then use that one
        $className = get_class($element);

        // strip namespaces;
        $className = substr($className, strrpos($className, '\\') + 1);

        // make first char lower case
        return strtolower(substr($className, 0, 1)) . substr($className, 1);
    }
1338368
private function elementAttr(string $element) : string
    {
        if (in_array($element, $this->elements) === true) {
            $attr = '';

            if (count($this->attr[$element]) > 0) {
                $attr = ' style="' . implode(' ', $this->attr[$element]) . '"';
            }

            return $attr;
        } else {
            return '';
        }
    }
569735
public function formElement(IElement $element)
    {
        if ($element instanceof Textarea) {
            return $this->formTextarea($element);
        } elseif ($element instanceof Select) {
            return $this->formSelect($element);
        } elseif ($element instanceof Submit) {
            return $this->formInput($element);
        } elseif ($element instanceof Button) {
            // todo: is it right?
            throw new InvalidArgumentException("Button element should be rendered without Helper.");
        } else {
            return $this->formInput($element);
        }
    }
128256
public function render(\Magento\Framework\Data\Form\Element\AbstractElement $element)
    {
        $block = $this->getLayout()->createBlock(
            \Dotdigitalgroup\Email\Block\Adminhtml\Config\Configuration\Preview::class,
            'ddg_automation_dynamic_preview'
        )->setTemplate(
            'system/preview.phtml'
        );
        $this->setElement($element);
        $header = $this->_getHeaderHtml($element);

        $elements = '';
        foreach ($element->getElements() as $field) {
            if ($field instanceof \Magento\Framework\Data\Form\Element\Fieldset) {
                $elements .= '<tr id="row_' . $field->getHtmlId() . '">'
                    . '<td colspan="4">' . $field->toHtml() . '</td></tr>';
            } else {
                $elements .= $field->toHtml();
            }
        }

        $footer = $this->_getFooterHtml($element);

        return $header . $block->_toHtml() . $elements . $footer;
    }
307081
public function translateAndEscapeProperty(AbstractRenderable $element, string $property): string
    {
        return $this->escape($this->translateProperty($element, $property));
    }
102834
private function elementBodyClasses(string $element) : string
    {
        if (in_array($element, $this->body_elements) === true) {
            $class = '';

            if (count($this->body_classes[$element]) > 0) {
                if (array_key_exists($element, $this->body_classes_first) === false) {
                    $class = ' ' . implode(' ', $this->body_classes[$element]);
                } else {
                    $class = '';
                    foreach ($this->body_classes[$element] as $body_class) {
                        if (array_key_exists($body_class, $this->body_classes_first[$element]) === false) {
                            $class .= ' ' . $body_class;
                        } else {
                            if ($this->body_classes_first[$element][$body_class] === true) {
                                $class .= ' ' . $body_class;
                                $this->body_classes_first[$element][$body_class] = false;
                            }
                        }
                    }
                }
            }

            return $class;
        } else {
            return '';
        }
    }
195850
public static function getNamespace(Element $element) {
        return substr($element->getFqsen(), 0, strlen($element->getFqsen())-strlen('\\'. $element->getName()));
        //return str_replace('\\' . $element->getName(), '', $element->getFqsen());
    }
429878
public function renderElement(Element $element) : string
    {
        // @todo - if the element implements neither HasContent or HasChildren, make it self-closing <img />
        // @todo - fix indentation - currently it adds an extra line as the middle indentation
        return $this->indent($this->depth, sprintf('<%s%s>', $element->getElement(), $this->getAttributesForElement($element))) .
            $this->indent($this->depth++, $this->getContentForElement($element)) .
            $this->indent(--$this->depth, sprintf('</%s>', $element->getElement()));
    }
395361
public function getAttributesForElement(Element $element) : string
    {
        $attributes = [];

        if ($this->usesTrait($element, Classable::class)) {
            $attributes[] = $element->renderClassAttribute();
        }

        if ($this->usesTrait($element, Spannable::class)) {
            $attributes[] = $element->renderSpanAttribute();
        }

        if ($this->usesTrait($element, Attributable::class)) {
            $attributes[] = $element->renderAttributes();
        }

        $attributes = array_filter($attributes);

        return $attributes ? ' ' . implode(' ', $attributes) : '';
    }
662163
protected function _asData(\SimpleXMLElement $element)
    {
        $output = $this->_property($element, 'attributes');

        if (!$element->count()) {
            $output['@value'] = (string)$element;
            if (!isset($output['@attributes'])) {
                $output = $output['@value'];
            }
        }

        return $output;
    }
243534
protected function _isInheritCheckboxRequired(\Magento\Framework\Data\Form\Element\AbstractElement $element)
    {
        return $element->getCanUseContainerValue() || $element->getCanUseDefaultValue();
    }
1298569
protected function getAttributesString(AbstractColumn $col)
    {
        $attributes = [];
        foreach ($this->getAttributes() as $attrKey => $attrValue) {
            if ('href' === $attrKey) {
                $attrValue = $this->getLinkReplaced($col);
            }
            $attributes[] = $attrKey.'="'.$attrValue.'"';
        }

        return implode(' ', $attributes);
    }
97971
public function render(ElementInterface $element): string
    {
        if (! $element instanceof ErrorAwareInterface) {
            throw new InvalidClassException(
                sprintf(
                    'The given element "%s" does not implement "%s"',
                    $element->name(),
                    ErrorAwareInterface::class
                )
            );
        }

        $errors = $element->errors();
        if (count($errors) < 1) {
            return '';
        }

        $html = array_reduce(
            $errors,
            function ($html, $error): string {
                $html .= sprintf(
                    $this->options['error'],
                    $error
                );

                return $html;
            },
            ''
        );

        return sprintf(
            $this->options['wrapper'],
            $html
        );
    }
1366555
public function formTextarea(IElement $element)
    {
        $attributes = $this->buildAttributes($element->getAttributes());

        return '<textarea ' . $attributes . '>' . $element->getValue() . '</textarea>';
    }