Builder Integrations
Note
此页面的内容需要进行重大更新。旧页面包含过时且可能不准确的信息。您仍然可以在 Mautic Developer Documentation archived repository 中访问它。
如果您有兴趣帮助开发此页面和其他新内容的,请考虑加入文档编写工作。
请阅读 Contributing Guidelines 和 Contributing to Mautic’s documentation 以开始贡献。
Builder 可以将其自身注册为 Email 和/或 Landing Page 的 “builder”。
Register the Integration as a Builder
要告知 IntegrationsBundle 该集成具有配置选项,请在插件的 app/config.php 文件中,使用 mautic.config_integration 标记集成或支持类。
<?php
return [
// ...
'services' => [
// ...
'integrations' => [
// ...
'helloworld.integration.builder' => [
'class' => \MauticPlugin\HelloWorldBundle\Integration\Support\BuilderSupport::class,
'tags' => [
'mautic.builder_integration',
],
],
// ...
],
// ...
],
// ...
];
BuilderSupport 类必须实现:
MauticIntegrationsBundleIntegrationInterfacesBuilderInterface
当前定义的接口中唯一的方法是 isSupported,该方法应返回一个布尔值,指示是否支持给定的功能。目前,Mautic 支持 email 和 page (Landing Pages)。这决定了哪些主题应该将某个 builder/feature 列为选项。