/** * Parse a custom element and return the resulting HTML code * * @param array $elementData The data to parse the template with * @return string HTML code */ public static function getHtmlFromElement($elementData) { try { $element = new CustomElement($elementData); return $element->generate(); } catch (\Exception $exception) { return ''; } }
/** * {@inheritdoc} */ public function generate() { return $this->customElement->generate(); }