A new Mautic component, listed under Components > Call Scripts (/s/call-scripts),
built like the other domains on AbstractStandardFormController/FormModel.
- CallScript (mt3s_call_scripts): name, description, category, owner, status,
the publish window shown as start/end date and time, the HTML script with
dynamic tokens kept as typed (html cleaning mask), the calling window
(weekdays, hours, sentinel in the contact's or a fixed timezone) and the retry
policy (max attempts, delay, backoff: none/linear/exponential)
- CallScriptOutcome (mt3s_call_script_outcomes, ON DELETE CASCADE): label,
data type (checkbox/radio/free text/dropdown), options JSON ({value,label})
and position; nested collections reuse the program-collection JS
- validators: ValidCallingWindow, ValidCallScriptOutcomeOptions, and an atPath
option on EndDateAfterStartDate so its violation lands on publishDown
- config: routes, the Components menu item (parent mautic.core.components),
call_script category type, model alias, call_scripts permissions, version 0.19.0
- migration Version_0_19_0 creates both tables and their FKs immediately
(users/categories SET NULL, outcomes CASCADE), idempotent
- translations en_US/fr_FR, unit tests, readme/AGENTS documentation
270 lines
15 KiB
PHP
270 lines
15 KiB
PHP
<?php
|
||
|
||
declare(strict_types=1);
|
||
|
||
return [
|
||
'name' => 'MT3S Marketing Program',
|
||
'description' => 'MT3S Marketing: programs, tasks, audiences, and smart links with their UTM taxonomies.',
|
||
'version' => '0.19.0',
|
||
'author' => 'Experiential',
|
||
|
||
'routes' => [
|
||
'main' => [
|
||
'mt3s_marketing_program_index' => [
|
||
'path' => '/marketing-programs/{page}',
|
||
'controller' => 'MauticPlugin\MT3SMarketingProgramBundle\Controller\ProgramController::indexAction',
|
||
],
|
||
// objectAction: view, new, edit, delete, batchDelete.
|
||
'mt3s_marketing_program_action' => [
|
||
'path' => '/marketing-programs/{objectAction}/{objectId}',
|
||
'controller' => 'MauticPlugin\MT3SMarketingProgramBundle\Controller\ProgramController::executeAction',
|
||
],
|
||
'mt3s_marketing_program_task_index' => [
|
||
'path' => '/marketing-program-tasks/{page}',
|
||
'controller' => 'MauticPlugin\MT3SMarketingProgramBundle\Controller\TaskController::indexAction',
|
||
],
|
||
// objectAction: new (optional ?program=ID), edit, delete, batchDelete.
|
||
'mt3s_marketing_program_task_action' => [
|
||
'path' => '/marketing-program-tasks/{objectAction}/{objectId}',
|
||
'controller' => 'MauticPlugin\MT3SMarketingProgramBundle\Controller\TaskController::executeAction',
|
||
],
|
||
'mt3s_marketing_program_stakeholder_index' => [
|
||
'path' => '/marketing-program-stakeholders/{page}',
|
||
'controller' => 'MauticPlugin\MT3SMarketingProgramBundle\Controller\StakeholderController::indexAction',
|
||
],
|
||
// objectAction: new, edit, delete, batchDelete.
|
||
'mt3s_marketing_program_stakeholder_action' => [
|
||
'path' => '/marketing-program-stakeholders/{objectAction}/{objectId}',
|
||
'controller' => 'MauticPlugin\MT3SMarketingProgramBundle\Controller\StakeholderController::executeAction',
|
||
],
|
||
'mt3s_marketing_program_audience_index' => [
|
||
'path' => '/marketing-program-audiences/{page}',
|
||
'controller' => 'MauticPlugin\MT3SMarketingProgramBundle\Controller\AudienceController::indexAction',
|
||
],
|
||
// objectAction: new, edit, delete, batchDelete.
|
||
'mt3s_marketing_program_audience_action' => [
|
||
'path' => '/marketing-program-audiences/{objectAction}/{objectId}',
|
||
'controller' => 'MauticPlugin\MT3SMarketingProgramBundle\Controller\AudienceController::executeAction',
|
||
],
|
||
// Call Scripts component (Components > Call Scripts): the list and its object actions.
|
||
'mt3s_call_script_index' => [
|
||
'path' => '/call-scripts/{page}',
|
||
'controller' => 'MauticPlugin\MT3SMarketingProgramBundle\Controller\CallScriptController::indexAction',
|
||
],
|
||
// objectAction: new, edit, delete, batchDelete.
|
||
'mt3s_call_script_action' => [
|
||
'path' => '/call-scripts/{objectAction}/{objectId}',
|
||
'controller' => 'MauticPlugin\MT3SMarketingProgramBundle\Controller\CallScriptController::executeAction',
|
||
],
|
||
// Smart Links domain: the list and its object actions.
|
||
'mt3s_smart_links_index' => [
|
||
'path' => '/smart-links/{page}',
|
||
'controller' => 'MauticPlugin\MT3SMarketingProgramBundle\Controller\SmartLinkController::indexAction',
|
||
],
|
||
'mt3s_smart_links_action' => [
|
||
'path' => '/smart-links/{objectAction}/{objectId}',
|
||
'controller' => 'MauticPlugin\MT3SMarketingProgramBundle\Controller\SmartLinkController::executeAction',
|
||
],
|
||
// UTM Taxonomies: the list and its object actions.
|
||
'mt3s_smart_links_taxonomies' => [
|
||
'path' => '/utm-taxonomies/{page}',
|
||
'controller' => 'MauticPlugin\MT3SMarketingProgramBundle\Controller\UtmTaxonomyController::indexAction',
|
||
],
|
||
'mt3s_smart_links_taxonomy_action' => [
|
||
'path' => '/utm-taxonomies/{objectAction}/{objectId}',
|
||
'controller' => 'MauticPlugin\MT3SMarketingProgramBundle\Controller\UtmTaxonomyController::executeAction',
|
||
],
|
||
// The type lists of the plugin's items (Insights, allocations, objectives, tasks,
|
||
// stakeholders, audience values), moved out of Settings > Configuration.
|
||
'mt3s_marketing_program_item_types_index' => [
|
||
'path' => '/marketing-program-item-types',
|
||
'controller' => 'MauticPlugin\MT3SMarketingProgramBundle\Controller\ItemTypesController::indexAction',
|
||
],
|
||
],
|
||
// https://{short_link_domain}/l/{slug}: the public entry point of the Smart Links.
|
||
// Public routes are served without the /s/ prefix and without authentication.
|
||
'public' => [
|
||
'mt3s_smart_links_go' => [
|
||
'path' => '/l/{slug}',
|
||
'controller' => 'MauticPlugin\MT3SMarketingProgramBundle\Controller\PublicController::goAction',
|
||
],
|
||
],
|
||
],
|
||
|
||
// Top-level "Marketing Programs" menu. Future program objects go in its children, after
|
||
// Programs; the Smart Links domain's pages (UTM Taxonomies, Smart Links) close the menu.
|
||
'menu' => [
|
||
'main' => [
|
||
'mt3s.marketing_program.menu.root' => [
|
||
'id' => 'mt3s_marketing_program_root',
|
||
'iconClass' => 'ri-calendar-line',
|
||
'access' => ['mt3smarketingprogram:programs:viewown', 'mt3smarketingprogram:programs:viewother', 'mt3smarketingprogram:tasks:viewown', 'mt3smarketingprogram:tasks:viewother', 'mt3smarketingprogram:stakeholders:viewown', 'mt3smarketingprogram:stakeholders:viewother', 'mt3smarketingprogram:audiences:viewown', 'mt3smarketingprogram:audiences:viewother', 'mt3smarketingprogram:itemtypes:view', 'mt3smarketingprogram:smart_links:viewown', 'mt3smarketingprogram:smart_links:viewother', 'mt3smarketingprogram:taxonomies:viewown', 'mt3smarketingprogram:taxonomies:viewother'],
|
||
'priority' => 5,
|
||
'children' => [
|
||
'mt3s.marketing_program.menu.index' => [
|
||
'id' => 'mt3s_marketing_program_index',
|
||
'route' => 'mt3s_marketing_program_index',
|
||
'access' => ['mt3smarketingprogram:programs:viewown', 'mt3smarketingprogram:programs:viewother'],
|
||
'priority' => 100,
|
||
],
|
||
'mt3s.marketing_program.task.menu.index' => [
|
||
'id' => 'mt3s_marketing_program_task_index',
|
||
'route' => 'mt3s_marketing_program_task_index',
|
||
'access' => ['mt3smarketingprogram:tasks:viewown', 'mt3smarketingprogram:tasks:viewother'],
|
||
'priority' => 90,
|
||
],
|
||
'mt3s.marketing_program.stakeholder.menu.index' => [
|
||
'id' => 'mt3s_marketing_program_stakeholder_index',
|
||
'route' => 'mt3s_marketing_program_stakeholder_index',
|
||
'access' => ['mt3smarketingprogram:stakeholders:viewown', 'mt3smarketingprogram:stakeholders:viewother'],
|
||
'priority' => 80,
|
||
],
|
||
'mt3s.marketing_program.audience.menu.index' => [
|
||
'id' => 'mt3s_marketing_program_audience_index',
|
||
'route' => 'mt3s_marketing_program_audience_index',
|
||
'access' => ['mt3smarketingprogram:audiences:viewown', 'mt3smarketingprogram:audiences:viewother'],
|
||
'priority' => 70,
|
||
],
|
||
'mt3s.marketing_program.menu.item_types' => [
|
||
'id' => 'mt3s_marketing_program_item_types_index',
|
||
'route' => 'mt3s_marketing_program_item_types_index',
|
||
'access' => ['mt3smarketingprogram:itemtypes:view'],
|
||
'priority' => 55,
|
||
],
|
||
// The Smart Links domain (UTM taxonomies, then the links) closes the menu, in
|
||
// that order. It is no longer a top-level group of its own.
|
||
'mt3s.smart_links.menu.taxonomies' => [
|
||
'id' => 'mt3s_smart_links_taxonomies',
|
||
'route' => 'mt3s_smart_links_taxonomies',
|
||
'iconClass' => 'ri-price-tag-3-line',
|
||
'access' => ['mt3smarketingprogram:taxonomies:viewown', 'mt3smarketingprogram:taxonomies:viewother'],
|
||
'priority' => 50,
|
||
],
|
||
'mt3s.smart_links.menu.smartlinks' => [
|
||
'id' => 'mt3s_smart_links_index',
|
||
'route' => 'mt3s_smart_links_index',
|
||
'iconClass' => 'ri-link',
|
||
'access' => ['mt3smarketingprogram:smart_links:viewown', 'mt3smarketingprogram:smart_links:viewother'],
|
||
'priority' => 45,
|
||
],
|
||
],
|
||
],
|
||
|
||
// The Call Script component: a flat item attached to core's Components menu. The
|
||
// "parent" key hands it to Mautic's orphan mechanism, which places it in that group;
|
||
// the key itself is the translation key of the label.
|
||
'mt3s.call_script.menu.index' => [
|
||
'route' => 'mt3s_call_script_index',
|
||
'access' => ['mt3smarketingprogram:call_scripts:viewown', 'mt3smarketingprogram:call_scripts:viewother'],
|
||
'parent' => 'mautic.core.components',
|
||
'priority' => 80,
|
||
],
|
||
],
|
||
],
|
||
|
||
'services' => [
|
||
'integrations' => [
|
||
'mt3s.marketing_program.integration' => [
|
||
'class' => MauticPlugin\MT3SMarketingProgramBundle\Integration\MT3SMarketingProgramIntegration::class,
|
||
'tags' => [
|
||
'mautic.integration',
|
||
'mautic.basic_integration',
|
||
],
|
||
],
|
||
'mt3s.marketing_program.integration.configuration' => [
|
||
'class' => MauticPlugin\MT3SMarketingProgramBundle\Integration\Support\MT3SMarketingProgramConfigSupport::class,
|
||
'tags' => [
|
||
'mautic.config_integration',
|
||
],
|
||
],
|
||
'mt3s.smart_links.integration' => [
|
||
'class' => MauticPlugin\MT3SMarketingProgramBundle\Integration\SmartlinksIntegration::class,
|
||
'tags' => [
|
||
'mautic.integration',
|
||
'mautic.basic_integration',
|
||
],
|
||
],
|
||
'mt3s.smart_links.integration.configuration' => [
|
||
'class' => MauticPlugin\MT3SMarketingProgramBundle\Integration\Support\SmartlinksConfigSupport::class,
|
||
'tags' => [
|
||
'mautic.config_integration',
|
||
],
|
||
],
|
||
],
|
||
],
|
||
|
||
// Registers "program" as a category type (Settings > Categories), used by Program::$category,
|
||
// and "call_script" for the Call Script component.
|
||
'categories' => [
|
||
'program' => [
|
||
'class' => MauticPlugin\MT3SMarketingProgramBundle\Entity\Program::class,
|
||
'label' => 'mt3s.marketing_program.category.type',
|
||
],
|
||
'call_script' => [
|
||
'class' => MauticPlugin\MT3SMarketingProgramBundle\Entity\CallScript::class,
|
||
'label' => 'mt3s.call_script.category.type',
|
||
],
|
||
],
|
||
|
||
'parameters' => [
|
||
// The currency of every amount in the plugin (ISO 4217), edited in Settings > Configuration >
|
||
// Program Settings. Read it through CurrencyProvider.
|
||
'mt3s_marketing_program_currency' => 'EUR',
|
||
|
||
// Item types, edited on the Item types page (Programs > Item types). Read them through
|
||
// ItemTypeProvider. Each is a list of ['key' => …, 'names' => [locale => …], 'descriptions' => [locale => …]],
|
||
// plus 'icon' => a Remix Icon class for description, allocation, objective, task and stakeholder types.
|
||
'mt3s_marketing_program_description_item_types' => [],
|
||
'mt3s_marketing_program_allocation_item_types' => [],
|
||
'mt3s_marketing_program_objective_types' => [],
|
||
'mt3s_marketing_program_task_types' => [],
|
||
'mt3s_marketing_program_stakeholder_types' => [],
|
||
|
||
// Default region (ISO 3166-1 alpha-2, e.g. FR) used to parse stakeholder phone numbers typed
|
||
// without a country prefix, on save. Read through StakeholderModel.
|
||
'mt3s_marketing_program_stakeholder_phone_region' => 'FR',
|
||
|
||
// Which audience persona attributes are offered on the audience forms, one toggle per attribute
|
||
// (Settings > Configuration > Program Settings). Read through AudienceAttributes; a parameter set
|
||
// to false turns the attribute off, and one that was never saved means enabled.
|
||
'mt3s_marketing_program_audience_attribute_tagline' => true,
|
||
'mt3s_marketing_program_audience_attribute_profile' => true,
|
||
'mt3s_marketing_program_audience_attribute_motivations' => true,
|
||
'mt3s_marketing_program_audience_attribute_barriers' => true,
|
||
'mt3s_marketing_program_audience_attribute_frustrations' => true,
|
||
'mt3s_marketing_program_audience_attribute_triggers' => true,
|
||
'mt3s_marketing_program_audience_attribute_decision_role' => true,
|
||
'mt3s_marketing_program_audience_attribute_tones' => true,
|
||
'mt3s_marketing_program_audience_attribute_channels' => true,
|
||
'mt3s_marketing_program_audience_attribute_stages' => true,
|
||
'mt3s_marketing_program_audience_attribute_size' => true,
|
||
|
||
// The values of an audience's closed attributes, edited in Settings > Configuration > Program
|
||
// Settings. Each is a list of ['key' => …, 'names' => [locale => …]], read through
|
||
// ItemTypeProvider (kinds "audience_decision_role" and "audience_tone").
|
||
'mt3s_marketing_program_audience_decision_roles' => [],
|
||
'mt3s_marketing_program_audience_tones' => [],
|
||
|
||
// Stored by Settings > Configuration > Smart Links Settings (SmartLinksConfigSubscriber).
|
||
// Read through UtmConfigurationProvider; the default stays empty, the catalog
|
||
// defaults are applied by UtmConfigurationNormalizer.
|
||
'mt3s_smart_links_utm_config' => [],
|
||
'mt3s_smart_links_config' => [
|
||
'short_link_domain' => '',
|
||
],
|
||
// Legacy keys of the earlier eras. Declared so the read fallbacks
|
||
// (UtmConfigurationProvider, SmartLinkModel, SmartLinkShortUrlBuilder) can serve
|
||
// upgrades from local.php until the settings are saved again; new values are
|
||
// always written to the new keys: `smartlinks_*` (the standalone
|
||
// SmartlinksBundle, 0.1.0–0.18.0) and `utm_manager_*` (the UtmManagerBundle, < 0.5.0).
|
||
'smartlinks_utm_config' => [],
|
||
'smartlinks_config' => [
|
||
'short_link_domain' => '',
|
||
],
|
||
'utm_manager_config' => [],
|
||
'utm_manager_smart_links' => [
|
||
'short_link_domain' => '',
|
||
],
|
||
],
|
||
];
|