getSnippetSystem(); $snippetSystem->attachJavascriptComboLibrary(); $subscribeTag = self::LOGICAL_TAG; $snippetSystem->attachJavascriptFromComponentId($subscribeTag) ->setFormat(Snippet::IIFE_FORMAT); $snippetSystem->attachCssInternalStyleSheet($subscribeTag); $success = TemplateForComponent::create($subscribeTag . "-success")->render([]); $data['list-value'] = $attributes->getValueAndRemove(self::LIST_ID_ATTRIBUTE); $data['list-name'] = "listGuid"; $data['email-name'] = "subscriberEmail"; $data['email-id'] = $executionContext->getIdManager()->generateNewHtmlIdForComponent("$subscribeTag-email"); $data['action'] = "https://api.combostrap.com/combo/public/v1.0/list/registration"; $data['success-content'] = $success; try { $data['primary-color'] = $executionContext->getConfig()->getPrimaryColor()->toCssValue(); } catch (ExceptionNotFound $e) { // none } $form = TemplateForComponent::create($subscribeTag . "-form")->render($data); return $attributes->toHtmlEnterTag("div") . $form . ''; } }