Compare commits
3
Commits
post-merge-v1
...
v1.0.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b138056e43 | ||
|
|
07773acb8d | ||
|
|
9d81d6c815 |
No files matched your search
@@ -0,0 +1,28 @@
|
|||||||
|
# Coding standards of the plugin: the same ruleset Mautic core runs
|
||||||
|
# (@Symfony + the core tweaks, see .php-cs-fixer.dist.php) and PHPStan level 6
|
||||||
|
# (see phpstan.neon). `composer install` in the plugin directory pulls
|
||||||
|
# mautic/core-lib (^7.0) so the analysis sees the real Mautic signatures.
|
||||||
|
#
|
||||||
|
# The PHPUnit suite is not run here: it needs a full Mautic installation
|
||||||
|
# (see Tests/bootstrap.php). Run it from the mautic-dev-env container:
|
||||||
|
# vendor/bin/phpunit -c docroot/plugins/MT3SMarketingProgramBundle/phpunit.xml.dist
|
||||||
|
|
||||||
|
stages:
|
||||||
|
- lint
|
||||||
|
|
||||||
|
.default-before-script: &default-before-script
|
||||||
|
- composer install --no-interaction --no-progress --prefer-dist
|
||||||
|
|
||||||
|
php-cs-fixer:
|
||||||
|
stage: lint
|
||||||
|
image: composer:2
|
||||||
|
before_script: *default-before-script
|
||||||
|
script:
|
||||||
|
- composer cs-check
|
||||||
|
|
||||||
|
phpstan:
|
||||||
|
stage: lint
|
||||||
|
image: composer:2
|
||||||
|
before_script: *default-before-script
|
||||||
|
script:
|
||||||
|
- composer phpstan
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"php":"8.3.36","version":"3.95.32:v3.95.32#c12acc751f4039935429057f1fadf0e5f62601c1","indent":" ","lineEnding":"\n","rules":{"align_multiline_comment":true,"backtick_to_shell_exec":true,"binary_operator_spaces":{"operators":{"=>":"align","=":"align"}},"blank_line_before_statement":{"statements":["return"]},"braces_position":{"allow_single_line_anonymous_functions":true,"allow_single_line_empty_anonymous_classes":true},"class_attributes_separation":{"elements":{"method":"one"}},"class_definition":{"single_line":true},"class_reference_name_casing":true,"clean_namespace":true,"concat_space":true,"declare_parentheses":true,"echo_tag_syntax":true,"empty_loop_body":{"style":"braces"},"empty_loop_condition":true,"fully_qualified_strict_types":true,"function_declaration":{"closure_fn_spacing":"one"},"general_phpdoc_tag_rename":{"replacements":{"inheritDocs":"inheritDoc"}},"global_namespace_import":{"import_classes":false,"import_constants":false,"import_functions":false},"include":true,"increment_style":true,"integer_literal_case":true,"lambda_not_used_import":true,"linebreak_after_opening_tag":true,"magic_constant_casing":true,"magic_method_casing":true,"method_argument_space":{"after_heredoc":true,"on_multiline":"ignore"},"native_function_casing":true,"native_type_declaration_casing":true,"no_alias_language_construct_call":true,"no_binary_string":true,"no_blank_lines_after_phpdoc":true,"no_empty_comment":true,"no_empty_phpdoc":true,"no_empty_statement":true,"no_extra_blank_lines":{"tokens":["attribute","case","continue","curly_brace_block","default","extra","parenthesis_brace_block","square_brace_block","switch","throw","use"]},"no_leading_namespace_whitespace":true,"no_mixed_echo_print":true,"no_multiline_whitespace_around_double_arrow":true,"no_null_property_initialization":true,"no_short_bool_cast":true,"no_singleline_whitespace_before_semicolons":true,"no_spaces_around_offset":true,"no_superfluous_phpdoc_tags":{"allow_mixed":true},"no_trailing_comma_in_singleline":true,"no_unneeded_braces":{"namespaces":true},"no_unneeded_control_parentheses":{"statements":["break","clone","continue","echo_print","negative_instanceof","others","return","switch_case","yield","yield_from"]},"no_unneeded_import_alias":true,"no_unset_cast":true,"no_unused_imports":true,"no_useless_concat_operator":true,"no_useless_else":true,"no_useless_nullsafe_operator":true,"no_useless_return":true,"no_whitespace_before_comma_in_array":{"after_heredoc":true},"normalize_index_brace":true,"object_operator_without_whitespace":true,"operator_linebreak":{"only_booleans":true},"ordered_imports":true,"php_unit_fqcn_annotation":true,"php_unit_method_casing":true,"phpdoc_align":true,"phpdoc_annotation_without_dot":true,"phpdoc_indent":true,"phpdoc_inline_tag_normalizer":true,"phpdoc_no_access":true,"phpdoc_no_alias_tag":{"replacements":{"const":"var","link":"see","property-read":"property","property-write":"property","type":"var"}},"phpdoc_no_package":true,"phpdoc_no_useless_inheritdoc":true,"phpdoc_order":{"order":["param","return","throws"]},"phpdoc_return_self_reference":true,"phpdoc_scalar":{"types":["boolean","callback","double","integer","never-return","never-returns","no-return","real","str"]},"phpdoc_separation":{"groups":[["Annotation","NamedArgumentConstructor","Target"],["author","copyright","license"],["category","package","subpackage"],["property","property-read","property-write"],["deprecated","link","see","since"]],"skip_unlisted_annotations":false},"phpdoc_single_line_var_spacing":true,"phpdoc_summary":true,"phpdoc_tag_type":{"tags":{"inheritDoc":"inline"}},"phpdoc_trim":true,"phpdoc_trim_consecutive_blank_line_separation":true,"phpdoc_types":true,"phpdoc_types_order":{"null_adjustment":"always_last","sort_algorithm":"none"},"phpdoc_var_annotation_correct_order":true,"phpdoc_var_without_name":true,"protected_to_private":true,"semicolon_after_instruction":true,"simple_to_complex_string_variable":true,"single_import_per_statement":true,"single_line_comment_spacing":true,"single_line_comment_style":{"comment_types":["hash"]},"single_line_throw":true,"single_quote":true,"single_space_around_construct":true,"space_after_semicolon":{"remove_in_empty_for_expressions":true},"standardize_increment":true,"standardize_not_equals":true,"statement_indentation":{"stick_comment_to_next_continuous_control_statement":true},"switch_continue_to_break":true,"trailing_comma_in_multiline":{"after_heredoc":true,"elements":["array_destructuring","arrays","match","parameters"]},"trim_array_spaces":true,"type_declaration_spaces":{"elements":["function","property"]},"unary_operator_spaces":true,"whitespace_after_comma_in_array":true,"yoda_style":true,"nullable_type_declaration":true,"ordered_types":{"null_adjustment":"always_last","sort_algorithm":"none"},"single_class_element_per_statement":true,"types_spaces":true,"array_indentation":true,"array_syntax":{"syntax":"short"},"attribute_block_no_spaces":true,"cast_spaces":true,"new_with_parentheses":{"anonymouLine truncated
|
||||||
@@ -0,0 +1,72 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* PHP-CS-Fixer configuration of the plugin: the same ruleset Mautic core runs
|
||||||
|
* (see its .php-cs-fixer.php), minus the custom fixer of the mautic/coding-standards
|
||||||
|
* package, which a standalone plugin repository cannot require.
|
||||||
|
*
|
||||||
|
* Check the coding style (CI runs this with --dry-run --diff):
|
||||||
|
*
|
||||||
|
* vendor/bin/php-cs-fixer fix --dry-run --diff --config=.php-cs-fixer.dist.php
|
||||||
|
*
|
||||||
|
* Fix in place:
|
||||||
|
*
|
||||||
|
* vendor/bin/php-cs-fixer fix --config=.php-cs-fixer.dist.php
|
||||||
|
*/
|
||||||
|
|
||||||
|
$finder = (new PhpCsFixer\Finder())
|
||||||
|
->in([
|
||||||
|
__DIR__.'/Catalog',
|
||||||
|
__DIR__.'/Command',
|
||||||
|
__DIR__.'/Config',
|
||||||
|
__DIR__.'/Controller',
|
||||||
|
__DIR__.'/DependencyInjection',
|
||||||
|
__DIR__.'/Entity',
|
||||||
|
__DIR__.'/Event',
|
||||||
|
__DIR__.'/EventListener',
|
||||||
|
__DIR__.'/Form',
|
||||||
|
__DIR__.'/Integration',
|
||||||
|
__DIR__.'/Migrations',
|
||||||
|
__DIR__.'/Model',
|
||||||
|
__DIR__.'/Security',
|
||||||
|
__DIR__.'/Service',
|
||||||
|
__DIR__.'/Tests',
|
||||||
|
__DIR__.'/Twig',
|
||||||
|
__DIR__.'/Validator',
|
||||||
|
])
|
||||||
|
->append([
|
||||||
|
__DIR__.'/MT3SMarketingProgramBundle.php',
|
||||||
|
]);
|
||||||
|
|
||||||
|
return (new PhpCsFixer\Config())
|
||||||
|
->setRules([
|
||||||
|
'@Symfony' => true,
|
||||||
|
'binary_operator_spaces' => [
|
||||||
|
'operators' => [
|
||||||
|
'=>' => 'align',
|
||||||
|
'=' => 'align',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'phpdoc_to_comment' => false,
|
||||||
|
'ordered_imports' => true,
|
||||||
|
'array_syntax' => [
|
||||||
|
'syntax' => 'short',
|
||||||
|
],
|
||||||
|
'no_unused_imports' => true,
|
||||||
|
/**
|
||||||
|
* The plugin's templates use the alternative syntax (endforeach, endif, ...)
|
||||||
|
* that Mautic's Twig templates rely on, so the rule stays off like in core.
|
||||||
|
*/
|
||||||
|
'no_alternative_syntax' => false,
|
||||||
|
'header_comment' => [
|
||||||
|
'header' => '',
|
||||||
|
],
|
||||||
|
'multiline_whitespace_before_semicolons' => true,
|
||||||
|
'nullable_type_declaration_for_default_null_value' => false, // Enforces potential BC breaks.
|
||||||
|
'no_superfluous_phpdoc_tags' => [
|
||||||
|
'allow_mixed' => true,
|
||||||
|
],
|
||||||
|
])
|
||||||
|
->setFinder($finder);
|
||||||
@@ -1,12 +1,12 @@
|
|||||||
/**
|
/**
|
||||||
* UTM Manager
|
* Smart Links (the plugin's second domain)
|
||||||
*
|
*
|
||||||
* - Settings > Configuration > UTM Manager tab: delegated handlers only (the configuration
|
* - Settings > Configuration > Smart Links Settings tab: delegated handlers only (the
|
||||||
* page is loaded through Ajax). Showing / hiding the value editor by mode is done by
|
* configuration page is loaded through Ajax). Showing / hiding the value editor by
|
||||||
* Mautic's own data-show-on switcher.
|
* mode is done by Mautic's own data-show-on switcher.
|
||||||
* - Smart Link form: short link preview, "Generate" a random slug, destination URL shown
|
* - Smart Link form: short link preview, "Generate" a random slug, destination URL shown
|
||||||
* only for external redirects. Started by Mautic.smartlinksSmartLinkOnLoad(), which Mautic
|
* only for external redirects. Started by Mautic.mt3sMpSmartLinkOnLoad(), which Mautic
|
||||||
* calls after it loads any page whose mauticContent is "smartlinksSmartLink".
|
* calls after it loads any page whose mauticContent is "mt3sMpSmartLink".
|
||||||
*/
|
*/
|
||||||
(function ($) {
|
(function ($) {
|
||||||
'use strict';
|
'use strict';
|
||||||
@@ -195,7 +195,7 @@
|
|||||||
$('#smartLinkMauticDestinationWrapper').toggleClass('hide', type !== 'mautic');
|
$('#smartLinkMauticDestinationWrapper').toggleClass('hide', type !== 'mautic');
|
||||||
};
|
};
|
||||||
|
|
||||||
Mautic.smartlinksSmartLinkOnLoad = function (container) {
|
Mautic.mt3sMpSmartLinkOnLoad = function (container) {
|
||||||
var $wrapper = $(container).find('.smart-link-slug-group').first();
|
var $wrapper = $(container).find('.smart-link-slug-group').first();
|
||||||
|
|
||||||
if ($wrapper.length) {
|
if ($wrapper.length) {
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ enum SmartLinkRedirectCode: int
|
|||||||
|
|
||||||
public function getLabelKey(): string
|
public function getLabelKey(): string
|
||||||
{
|
{
|
||||||
return 'mautic.smartlinks.smart_links.redirect_code.'.$this->value;
|
return 'mt3s.smart_links.smart_links.redirect_code.'.$this->value;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function isPermanent(): bool
|
public function isPermanent(): bool
|
||||||
|
|||||||
@@ -7,13 +7,15 @@ namespace MauticPlugin\MT3SMarketingProgramBundle\Catalog;
|
|||||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Choice labels for Smart Link redirect enums: t("mautic.smartlinks.smart_links.redirect_<x>.<value>")
|
* Choice labels for Smart Link redirect enums: t("mt3s.smart_links.smart_links.redirect_<x>.<value>")
|
||||||
* gives "301 - Moved permanently (permanent)" style labels shared by the form and the list view.
|
* gives "301 - Moved permanently (permanent)" style labels shared by the form and the list view.
|
||||||
*/
|
*/
|
||||||
trait SmartLinkRedirectEnumHelper
|
trait SmartLinkRedirectEnumHelper
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @return array<int|string, string> value (as string) => label
|
* The choices of the form's redirect dropdowns and the list views: translated label => backing value.
|
||||||
|
*
|
||||||
|
* @return array<string, int|string> translated label => backing value of the enum case
|
||||||
*/
|
*/
|
||||||
public static function getChoices(TranslatorInterface $translator): array
|
public static function getChoices(TranslatorInterface $translator): array
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ enum SmartLinkRedirectType: string
|
|||||||
|
|
||||||
public function getLabelKey(): string
|
public function getLabelKey(): string
|
||||||
{
|
{
|
||||||
return 'mautic.smartlinks.smart_links.redirect_type.'.($this->isMautic() ? self::MAUTIC : self::EXTERNAL);
|
return 'mt3s.smart_links.smart_links.redirect_type.'.($this->isMautic() ? self::MAUTIC : self::EXTERNAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function isMautic(): bool
|
public function isMautic(): bool
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ namespace MauticPlugin\MT3SMarketingProgramBundle\Catalog;
|
|||||||
*/
|
*/
|
||||||
final class UtmParameterDefinition
|
final class UtmParameterDefinition
|
||||||
{
|
{
|
||||||
private const TRANSLATION_PREFIX = 'mautic.smartlinks.config.parameter.';
|
private const TRANSLATION_PREFIX = 'mt3s.smart_links.config.parameter.';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string[] $suggestions Suggested values offered by the "Load suggested values" button
|
* @param string[] $suggestions Suggested values offered by the "Load suggested values" button
|
||||||
@@ -54,6 +54,6 @@ final class UtmParameterDefinition
|
|||||||
|
|
||||||
public static function getSuggestionLabelKey(string $value): string
|
public static function getSuggestionLabelKey(string $value): string
|
||||||
{
|
{
|
||||||
return 'mautic.smartlinks.config.suggestion.'.$value;
|
return 'mt3s.smart_links.config.suggestion.'.$value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+25
-19
@@ -5,7 +5,7 @@ declare(strict_types=1);
|
|||||||
return [
|
return [
|
||||||
'name' => 'MT3S Marketing Program',
|
'name' => 'MT3S Marketing Program',
|
||||||
'description' => 'MT3S Marketing: programs, tasks, audiences, and smart links with their UTM taxonomies.',
|
'description' => 'MT3S Marketing: programs, tasks, audiences, and smart links with their UTM taxonomies.',
|
||||||
'version' => '0.18.0',
|
'version' => '0.18.1',
|
||||||
'author' => 'Experiential',
|
'author' => 'Experiential',
|
||||||
|
|
||||||
'routes' => [
|
'routes' => [
|
||||||
@@ -47,20 +47,20 @@ return [
|
|||||||
'controller' => 'MauticPlugin\MT3SMarketingProgramBundle\Controller\AudienceController::executeAction',
|
'controller' => 'MauticPlugin\MT3SMarketingProgramBundle\Controller\AudienceController::executeAction',
|
||||||
],
|
],
|
||||||
// Smart Links domain: the list and its object actions.
|
// Smart Links domain: the list and its object actions.
|
||||||
'mautic_smartlinks_index' => [
|
'mt3s_smart_links_index' => [
|
||||||
'path' => '/smart-links/{page}',
|
'path' => '/smart-links/{page}',
|
||||||
'controller' => 'MauticPlugin\MT3SMarketingProgramBundle\Controller\SmartLinkController::indexAction',
|
'controller' => 'MauticPlugin\MT3SMarketingProgramBundle\Controller\SmartLinkController::indexAction',
|
||||||
],
|
],
|
||||||
'mautic_smartlinks_action' => [
|
'mt3s_smart_links_action' => [
|
||||||
'path' => '/smart-links/{objectAction}/{objectId}',
|
'path' => '/smart-links/{objectAction}/{objectId}',
|
||||||
'controller' => 'MauticPlugin\MT3SMarketingProgramBundle\Controller\SmartLinkController::executeAction',
|
'controller' => 'MauticPlugin\MT3SMarketingProgramBundle\Controller\SmartLinkController::executeAction',
|
||||||
],
|
],
|
||||||
// UTM Taxonomies: the list and its object actions.
|
// UTM Taxonomies: the list and its object actions.
|
||||||
'mautic_smartlinks_taxonomies' => [
|
'mt3s_smart_links_taxonomies' => [
|
||||||
'path' => '/utm-taxonomies/{page}',
|
'path' => '/utm-taxonomies/{page}',
|
||||||
'controller' => 'MauticPlugin\MT3SMarketingProgramBundle\Controller\UtmTaxonomyController::indexAction',
|
'controller' => 'MauticPlugin\MT3SMarketingProgramBundle\Controller\UtmTaxonomyController::indexAction',
|
||||||
],
|
],
|
||||||
'mautic_smartlinks_taxonomy_action' => [
|
'mt3s_smart_links_taxonomy_action' => [
|
||||||
'path' => '/utm-taxonomies/{objectAction}/{objectId}',
|
'path' => '/utm-taxonomies/{objectAction}/{objectId}',
|
||||||
'controller' => 'MauticPlugin\MT3SMarketingProgramBundle\Controller\UtmTaxonomyController::executeAction',
|
'controller' => 'MauticPlugin\MT3SMarketingProgramBundle\Controller\UtmTaxonomyController::executeAction',
|
||||||
],
|
],
|
||||||
@@ -74,7 +74,7 @@ return [
|
|||||||
// https://{short_link_domain}/l/{slug}: the public entry point of the Smart Links.
|
// 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 routes are served without the /s/ prefix and without authentication.
|
||||||
'public' => [
|
'public' => [
|
||||||
'mautic_smartlinks_go' => [
|
'mt3s_smart_links_go' => [
|
||||||
'path' => '/l/{slug}',
|
'path' => '/l/{slug}',
|
||||||
'controller' => 'MauticPlugin\MT3SMarketingProgramBundle\Controller\PublicController::goAction',
|
'controller' => 'MauticPlugin\MT3SMarketingProgramBundle\Controller\PublicController::goAction',
|
||||||
],
|
],
|
||||||
@@ -125,9 +125,9 @@ return [
|
|||||||
|
|
||||||
// Top-level "Smart Links" menu: UTM Taxonomies above the Smart Links list. The two
|
// Top-level "Smart Links" menu: UTM Taxonomies above the Smart Links list. The two
|
||||||
// domains (Marketing Program and Smart Links) stay separate menu groups.
|
// domains (Marketing Program and Smart Links) stay separate menu groups.
|
||||||
'mautic.smartlinks.menu.root' => [
|
'mt3s.smart_links.menu.root' => [
|
||||||
'id' => 'mautic_smartlinks',
|
'id' => 'mt3s_smart_links',
|
||||||
'route' => 'mautic_smartlinks_index',
|
'route' => 'mt3s_smart_links_index',
|
||||||
'iconClass' => 'ri-links-line',
|
'iconClass' => 'ri-links-line',
|
||||||
'access' => [
|
'access' => [
|
||||||
'mt3smarketingprogram:smart_links:viewown',
|
'mt3smarketingprogram:smart_links:viewown',
|
||||||
@@ -137,16 +137,16 @@ return [
|
|||||||
],
|
],
|
||||||
'priority' => 4,
|
'priority' => 4,
|
||||||
'children' => [
|
'children' => [
|
||||||
'mautic.smartlinks.menu.taxonomies' => [
|
'mt3s.smart_links.menu.taxonomies' => [
|
||||||
'id' => 'mautic_smartlinks_taxonomies',
|
'id' => 'mt3s_smart_links_taxonomies',
|
||||||
'route' => 'mautic_smartlinks_taxonomies',
|
'route' => 'mt3s_smart_links_taxonomies',
|
||||||
'iconClass' => 'ri-price-tag-3-line',
|
'iconClass' => 'ri-price-tag-3-line',
|
||||||
'access' => ['mt3smarketingprogram:taxonomies:viewown', 'mt3smarketingprogram:taxonomies:viewother'],
|
'access' => ['mt3smarketingprogram:taxonomies:viewown', 'mt3smarketingprogram:taxonomies:viewother'],
|
||||||
'priority' => 5,
|
'priority' => 5,
|
||||||
],
|
],
|
||||||
'mautic.smartlinks.menu.smartlinks' => [
|
'mt3s.smart_links.menu.smartlinks' => [
|
||||||
'id' => 'mautic_smartlinks_index',
|
'id' => 'mt3s_smart_links_index',
|
||||||
'route' => 'mautic_smartlinks_index',
|
'route' => 'mt3s_smart_links_index',
|
||||||
'iconClass' => 'ri-link',
|
'iconClass' => 'ri-link',
|
||||||
'access' => ['mt3smarketingprogram:smart_links:viewown', 'mt3smarketingprogram:smart_links:viewother'],
|
'access' => ['mt3smarketingprogram:smart_links:viewown', 'mt3smarketingprogram:smart_links:viewother'],
|
||||||
'priority' => 4,
|
'priority' => 4,
|
||||||
@@ -179,7 +179,7 @@ return [
|
|||||||
],
|
],
|
||||||
],
|
],
|
||||||
'mt3s.smart_links.integration.configuration' => [
|
'mt3s.smart_links.integration.configuration' => [
|
||||||
'class' => MauticPlugin\MT3SMarketingProgramBundle\Integration\Support\ConfigSupport::class,
|
'class' => MauticPlugin\MT3SMarketingProgramBundle\Integration\Support\SmartlinksConfigSupport::class,
|
||||||
'tags' => [
|
'tags' => [
|
||||||
'mautic.config_integration',
|
'mautic.config_integration',
|
||||||
],
|
],
|
||||||
@@ -237,13 +237,19 @@ return [
|
|||||||
// Stored by Settings > Configuration > Smart Links Settings (SmartLinksConfigSubscriber).
|
// Stored by Settings > Configuration > Smart Links Settings (SmartLinksConfigSubscriber).
|
||||||
// Read through UtmConfigurationProvider; the default stays empty, the catalog
|
// Read through UtmConfigurationProvider; the default stays empty, the catalog
|
||||||
// defaults are applied by UtmConfigurationNormalizer.
|
// 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_utm_config' => [],
|
||||||
'smartlinks_config' => [
|
'smartlinks_config' => [
|
||||||
'short_link_domain' => '',
|
'short_link_domain' => '',
|
||||||
],
|
],
|
||||||
// Legacy keys of the standalone Smartlinks plugin era (< 0.18.0). Declared so the
|
|
||||||
// read fallbacks can serve upgrades from local.php until the settings are saved
|
|
||||||
// again; new values are always written to the new keys.
|
|
||||||
'utm_manager_config' => [],
|
'utm_manager_config' => [],
|
||||||
'utm_manager_smart_links' => [
|
'utm_manager_smart_links' => [
|
||||||
'short_link_domain' => '',
|
'short_link_domain' => '',
|
||||||
|
|||||||
+9
-17
@@ -25,21 +25,13 @@ return function (ContainerConfigurator $configurator): void {
|
|||||||
$services->load('MauticPlugin\\MT3SMarketingProgramBundle\\Entity\\', '../Entity/*Repository.php')
|
$services->load('MauticPlugin\\MT3SMarketingProgramBundle\\Entity\\', '../Entity/*Repository.php')
|
||||||
->tag(Doctrine\Bundle\DoctrineBundle\DependencyInjection\Compiler\ServiceRepositoryCompilerPass::REPOSITORY_SERVICE_TAG);
|
->tag(Doctrine\Bundle\DoctrineBundle\DependencyInjection\Compiler\ServiceRepositoryCompilerPass::REPOSITORY_SERVICE_TAG);
|
||||||
|
|
||||||
// Lets core resolve the model with getModel('mt3smp.program').
|
// Core resolves getModel('mt3smarketingprogram.<entity>') to mautic.mt3smarketingprogram.model.<entity>:
|
||||||
$services->alias('mt3s.marketing_program.model.program', MauticPlugin\MT3SMarketingProgramBundle\Model\ProgramModel::class);
|
// exactly one alias per model, under the bundle's canonical prefix.
|
||||||
$services->alias('mautic.mt3smp.model.program', MauticPlugin\MT3SMarketingProgramBundle\Model\ProgramModel::class);
|
$services->alias('mautic.mt3smarketingprogram.model.program', MauticPlugin\MT3SMarketingProgramBundle\Model\ProgramModel::class);
|
||||||
// getModel('mt3smp.task').
|
$services->alias('mautic.mt3smarketingprogram.model.task', MauticPlugin\MT3SMarketingProgramBundle\Model\TaskModel::class);
|
||||||
$services->alias('mt3s.marketing_program.model.task', MauticPlugin\MT3SMarketingProgramBundle\Model\TaskModel::class);
|
$services->alias('mautic.mt3smarketingprogram.model.stakeholder', MauticPlugin\MT3SMarketingProgramBundle\Model\StakeholderModel::class);
|
||||||
$services->alias('mautic.mt3smp.model.task', MauticPlugin\MT3SMarketingProgramBundle\Model\TaskModel::class);
|
$services->alias('mautic.mt3smarketingprogram.model.audience', MauticPlugin\MT3SMarketingProgramBundle\Model\AudienceModel::class);
|
||||||
// getModel('mt3smp.stakeholder').
|
// Smart Links domain: getModel('mt3smarketingprogram.smart_link') / getModel('mt3smarketingprogram.utm_taxonomy').
|
||||||
$services->alias('mt3s.marketing_program.model.stakeholder', MauticPlugin\MT3SMarketingProgramBundle\Model\StakeholderModel::class);
|
$services->alias('mautic.mt3smarketingprogram.model.smart_link', MauticPlugin\MT3SMarketingProgramBundle\Model\SmartLinkModel::class);
|
||||||
$services->alias('mautic.mt3smp.model.stakeholder', MauticPlugin\MT3SMarketingProgramBundle\Model\StakeholderModel::class);
|
$services->alias('mautic.mt3smarketingprogram.model.utm_taxonomy', MauticPlugin\MT3SMarketingProgramBundle\Model\UtmTaxonomyModel::class);
|
||||||
// getModel('mt3smp.audience').
|
|
||||||
$services->alias('mt3s.marketing_program.model.audience', MauticPlugin\MT3SMarketingProgramBundle\Model\AudienceModel::class);
|
|
||||||
// Smart Links domain: getModel('smartlinks.smart_link') / getModel('smartlinks.utm_taxonomy').
|
|
||||||
$services->alias('mt3s.smart_links.model.smart_link', MauticPlugin\MT3SMarketingProgramBundle\Model\SmartLinkModel::class);
|
|
||||||
$services->alias('mautic.smartlinks.model.smart_link', MauticPlugin\MT3SMarketingProgramBundle\Model\SmartLinkModel::class);
|
|
||||||
$services->alias('mt3s.smart_links.model.utm_taxonomy', MauticPlugin\MT3SMarketingProgramBundle\Model\UtmTaxonomyModel::class);
|
|
||||||
$services->alias('mautic.smartlinks.model.utm_taxonomy', MauticPlugin\MT3SMarketingProgramBundle\Model\UtmTaxonomyModel::class);
|
|
||||||
$services->alias('mautic.mt3smp.model.audience', MauticPlugin\MT3SMarketingProgramBundle\Model\AudienceModel::class);
|
|
||||||
};
|
};
|
||||||
@@ -14,7 +14,7 @@ use Symfony\Component\HttpFoundation\Response;
|
|||||||
* link to them from their Audiences tab (ProgramAudience carries the audience's priority in that
|
* link to them from their Audiences tab (ProgramAudience carries the audience's priority in that
|
||||||
* program).
|
* program).
|
||||||
*
|
*
|
||||||
* Model mt3smp.audience (mt3s.marketing_program.model.audience), permission base mt3smarketingprogram:audiences, translation
|
* Model mt3smarketingprogram.audience (mautic.mt3smarketingprogram.model.audience), permission base mt3smarketingprogram:audiences, translation
|
||||||
* base mt3s.marketing_program.audience.
|
* base mt3s.marketing_program.audience.
|
||||||
*/
|
*/
|
||||||
class AudienceController extends AbstractStandardFormController
|
class AudienceController extends AbstractStandardFormController
|
||||||
@@ -24,7 +24,7 @@ class AudienceController extends AbstractStandardFormController
|
|||||||
|
|
||||||
protected function getModelName(): string
|
protected function getModelName(): string
|
||||||
{
|
{
|
||||||
return 'mt3smp.audience';
|
return 'mt3smarketingprogram.audience';
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getTemplateBase(): string
|
protected function getTemplateBase(): string
|
||||||
|
|||||||
@@ -11,10 +11,11 @@ use Symfony\Component\HttpFoundation\Request;
|
|||||||
use Symfony\Component\HttpFoundation\Response;
|
use Symfony\Component\HttpFoundation\Response;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* List, view, create, edit and delete plans, using core's standard CRUD flow.
|
* List, view, create, edit and delete marketing programs, using core's standard CRUD flow.
|
||||||
*
|
*
|
||||||
* Core derives most names from the model name "program": model mt3s.marketing_program.model.program, permission base
|
* Core derives the model alias and the permission base from the model name
|
||||||
* mt3smarketingprogram:programs (from ProgramModel), translation base mt3s.marketing_program, session base mt3s.marketing_program.
|
* "mt3smarketingprogram.program": model mautic.mt3smarketingprogram.model.program, permission
|
||||||
|
* base mt3smarketingprogram:programs (from ProgramModel). The views translate under mt3s.marketing_program.*.
|
||||||
*/
|
*/
|
||||||
class ProgramController extends AbstractStandardFormController
|
class ProgramController extends AbstractStandardFormController
|
||||||
{
|
{
|
||||||
@@ -23,7 +24,7 @@ class ProgramController extends AbstractStandardFormController
|
|||||||
|
|
||||||
protected function getModelName(): string
|
protected function getModelName(): string
|
||||||
{
|
{
|
||||||
return 'mt3smp.program';
|
return 'mt3smarketingprogram.program';
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getTemplateBase(): string
|
protected function getTemplateBase(): string
|
||||||
@@ -47,7 +48,7 @@ class ProgramController extends AbstractStandardFormController
|
|||||||
/**
|
/**
|
||||||
* The OnLoad JS prefix: core dispatches Mautic[getJsLoadMethodPrefix() + "OnLoad"]()
|
* The OnLoad JS prefix: core dispatches Mautic[getJsLoadMethodPrefix() + "OnLoad"]()
|
||||||
* (mt3sMpProgramOnLoad in Assets/js/mt3s-mp-program.js). Without this override, core
|
* (mt3sMpProgramOnLoad in Assets/js/mt3s-mp-program.js). Without this override, core
|
||||||
* falls back to the model name ("mt3smp.program"), which nothing listens to.
|
* falls back to the model name ("mt3smarketingprogram.program"), which nothing listens to.
|
||||||
*/
|
*/
|
||||||
protected function getJsLoadMethodPrefix(): string
|
protected function getJsLoadMethodPrefix(): string
|
||||||
{
|
{
|
||||||
@@ -79,7 +80,7 @@ class ProgramController extends AbstractStandardFormController
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!$this->checkActionPermission('view', $program)) {
|
if (!$this->checkActionPermission('view', $program)) {
|
||||||
return $this->accessDenied();
|
$this->throwAccessDenied();
|
||||||
}
|
}
|
||||||
|
|
||||||
$base = $this->getPermissionBase();
|
$base = $this->getPermissionBase();
|
||||||
@@ -148,7 +149,7 @@ class ProgramController extends AbstractStandardFormController
|
|||||||
|
|
||||||
private function getTaskModel(): TaskModel
|
private function getTaskModel(): TaskModel
|
||||||
{
|
{
|
||||||
$model = $this->getModel('mt3smp.task');
|
$model = $this->getModel('mt3smarketingprogram.task');
|
||||||
\assert($model instanceof TaskModel);
|
\assert($model instanceof TaskModel);
|
||||||
|
|
||||||
return $model;
|
return $model;
|
||||||
|
|||||||
@@ -4,13 +4,21 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace MauticPlugin\MT3SMarketingProgramBundle\Controller;
|
namespace MauticPlugin\MT3SMarketingProgramBundle\Controller;
|
||||||
|
|
||||||
|
use Doctrine\Persistence\ManagerRegistry;
|
||||||
use Mautic\CoreBundle\Controller\CommonController;
|
use Mautic\CoreBundle\Controller\CommonController;
|
||||||
use MauticPlugin\MT3SMarketingProgramBundle\Entity\SmartLink;
|
use Mautic\CoreBundle\Factory\ModelFactory;
|
||||||
|
use Mautic\CoreBundle\Helper\CoreParametersHelper;
|
||||||
|
use Mautic\CoreBundle\Helper\UserHelper;
|
||||||
|
use Mautic\CoreBundle\Security\Permissions\CorePermissions;
|
||||||
|
use Mautic\CoreBundle\Service\FlashBag;
|
||||||
|
use Mautic\CoreBundle\Translation\Translator;
|
||||||
use MauticPlugin\MT3SMarketingProgramBundle\Model\SmartLinkModel;
|
use MauticPlugin\MT3SMarketingProgramBundle\Model\SmartLinkModel;
|
||||||
|
use Psr\Log\LoggerInterface;
|
||||||
|
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
|
||||||
use Symfony\Component\HttpFoundation\RedirectResponse;
|
use Symfony\Component\HttpFoundation\RedirectResponse;
|
||||||
use Symfony\Component\HttpFoundation\Request;
|
use Symfony\Component\HttpFoundation\Request;
|
||||||
|
use Symfony\Component\HttpFoundation\RequestStack;
|
||||||
use Symfony\Component\HttpFoundation\Response;
|
use Symfony\Component\HttpFoundation\Response;
|
||||||
use Symfony\Contracts\Service\Attribute\Required;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The public side of the Smart Links: https://{short_link_domain}/l/{slug}.
|
* The public side of the Smart Links: https://{short_link_domain}/l/{slug}.
|
||||||
@@ -24,12 +32,20 @@ use Symfony\Contracts\Service\Attribute\Required;
|
|||||||
*/
|
*/
|
||||||
class PublicController extends CommonController
|
class PublicController extends CommonController
|
||||||
{
|
{
|
||||||
private SmartLinkModel $smartLinkModel;
|
public function __construct(
|
||||||
|
private readonly SmartLinkModel $smartLinkModel,
|
||||||
#[Required]
|
private readonly LoggerInterface $logger,
|
||||||
public function autowirePublicController(SmartLinkModel $smartLinkModel): void
|
ManagerRegistry $doctrine,
|
||||||
{
|
ModelFactory $modelFactory,
|
||||||
$this->smartLinkModel = $smartLinkModel;
|
UserHelper $userHelper,
|
||||||
|
CoreParametersHelper $coreParametersHelper,
|
||||||
|
EventDispatcherInterface $dispatcher,
|
||||||
|
Translator $translator,
|
||||||
|
FlashBag $flashBag,
|
||||||
|
RequestStack $requestStack,
|
||||||
|
CorePermissions $security,
|
||||||
|
) {
|
||||||
|
parent::__construct($doctrine, $modelFactory, $userHelper, $coreParametersHelper, $dispatcher, $translator, $flashBag, $requestStack, $security);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function goAction(Request $request, string $slug): Response
|
public function goAction(Request $request, string $slug): Response
|
||||||
@@ -64,7 +80,14 @@ class PublicController extends CommonController
|
|||||||
$this->smartLinkModel->recordHit($link, $request);
|
$this->smartLinkModel->recordHit($link, $request);
|
||||||
} catch (\Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
// Statistics must never block the redirect.
|
// Statistics must never block the redirect.
|
||||||
error_log('Smart Link hit could not be recorded for slug "'.$slug.'": '.$e->getMessage().' in '.$e->getFile().':'.$e->getLine());
|
$this->logger->error(
|
||||||
|
'Smart Link hit could not be recorded for slug "{slug}": {message}',
|
||||||
|
[
|
||||||
|
'slug' => $slug,
|
||||||
|
'message' => $e->getMessage(),
|
||||||
|
'exception' => $e,
|
||||||
|
]
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return new RedirectResponse($this->smartLinkModel->buildRedirectUrl($link), $link->getRedirectCode()->value);
|
return new RedirectResponse($this->smartLinkModel->buildRedirectUrl($link), $link->getRedirectCode()->value);
|
||||||
|
|||||||
@@ -14,8 +14,8 @@ use Symfony\Component\HttpFoundation\Response;
|
|||||||
/**
|
/**
|
||||||
* Create, edit and delete Smart Links (main menu > Smart Links), using core's standard CRUD flow.
|
* Create, edit and delete Smart Links (main menu > Smart Links), using core's standard CRUD flow.
|
||||||
*
|
*
|
||||||
* Model smartlinks.smart_link (mautic.smartlinks.model.smart_link), permission base
|
* Model mt3smarketingprogram.smart_link (mautic.mt3smarketingprogram.model.smart_link), permission base
|
||||||
* smartlinks:smart_links, translation base mautic.smartlinks.smart_links.
|
* mt3smarketingprogram:smart_links, translation base mt3s.smart_links.smart_links.
|
||||||
*
|
*
|
||||||
* The slug of a saved link is immutable: the form disables the field, the model refuses another
|
* The slug of a saved link is immutable: the form disables the field, the model refuses another
|
||||||
* slug, and this controller drops the submitted value (nothing to re-check). There is no clone:
|
* slug, and this controller drops the submitted value (nothing to re-check). There is no clone:
|
||||||
@@ -23,12 +23,12 @@ use Symfony\Component\HttpFoundation\Response;
|
|||||||
*/
|
*/
|
||||||
class SmartLinkController extends AbstractStandardFormController
|
class SmartLinkController extends AbstractStandardFormController
|
||||||
{
|
{
|
||||||
public const ROUTE_INDEX = 'mautic_smartlinks_index';
|
public const ROUTE_INDEX = 'mt3s_smart_links_index';
|
||||||
public const ROUTE_ACTION = 'mautic_smartlinks_action';
|
public const ROUTE_ACTION = 'mt3s_smart_links_action';
|
||||||
|
|
||||||
protected function getModelName(): string
|
protected function getModelName(): string
|
||||||
{
|
{
|
||||||
return 'smartlinks.smart_link';
|
return 'mt3smarketingprogram.smart_link';
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getTemplateBase(): string
|
protected function getTemplateBase(): string
|
||||||
@@ -47,20 +47,22 @@ class SmartLinkController extends AbstractStandardFormController
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Core builds mautic_smartlinkssmartlink from the model name; the JS loader relies on this prefix.
|
* The OnLoad JS prefix: core dispatches Mautic[getJsLoadMethodPrefix() + "OnLoad"]()
|
||||||
|
* (Mautic.mt3sMpSmartLinkOnLoad in Assets/js/mt3s-mp-smartlinks.js). Without this
|
||||||
|
* override, core falls back to the model name, which nothing listens to.
|
||||||
*/
|
*/
|
||||||
protected function getJsLoadMethodPrefix(): string
|
protected function getJsLoadMethodPrefix(): string
|
||||||
{
|
{
|
||||||
return 'smartlinksSmartLink';
|
return 'mt3sMpSmartLink';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Core builds mautic.<model name> (singular smart_link); every key of the feature lives
|
* Core builds mautic.<model name> (singular smart_link); every key of the feature lives
|
||||||
* under mautic.smartlinks.smart_links.
|
* under mt3s.smart_links.smart_links.
|
||||||
*/
|
*/
|
||||||
protected function getTranslationBase(): string
|
protected function getTranslationBase(): string
|
||||||
{
|
{
|
||||||
return 'mautic.smartlinks.smart_links';
|
return 'mt3s.smart_links.smart_links';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -101,13 +103,18 @@ class SmartLinkController extends AbstractStandardFormController
|
|||||||
/**
|
/**
|
||||||
* Never save the slug of an existing link: it is immutable once created. The field is
|
* Never save the slug of an existing link: it is immutable once created. The field is
|
||||||
* disabled in the form, so nothing is submitted for it, this is a safety net.
|
* disabled in the form, so nothing is submitted for it, this is a safety net.
|
||||||
|
*
|
||||||
|
* @param SmartLink $entity
|
||||||
|
* @param string $action
|
||||||
|
* @param int|null $objectId
|
||||||
|
* @param bool $isClone
|
||||||
*/
|
*/
|
||||||
protected function beforeEntitySave($entity, Form $form, $action, $objectId = null, $isClone = false): bool
|
protected function beforeEntitySave($entity, Form $form, $action, $objectId = null, $isClone = false): bool
|
||||||
{
|
{
|
||||||
if ($entity instanceof SmartLink && null !== $entity->getId()) {
|
if ($entity instanceof SmartLink && null !== $entity->getId()) {
|
||||||
$formSlug = $form->has('slug') ? (string) $form->get('slug')->getData() : '';
|
$formSlug = $form->has('slug') ? (string) $form->get('slug')->getData() : '';
|
||||||
if ('' !== $formSlug && $formSlug !== (string) $entity->getSlug()) {
|
if ('' !== $formSlug && $formSlug !== (string) $entity->getSlug()) {
|
||||||
$this->addFlashMessage('mautic.smartlinks.smart_links.error.slug_immutable', ['%slug%' => $formSlug], \Mautic\CoreBundle\FlashBag::LEVEL_ERROR);
|
$this->addFlashMessage('mt3s.smart_links.smart_links.error.slug_immutable', ['%slug%' => $formSlug], \Mautic\CoreBundle\Service\FlashBag::LEVEL_ERROR);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -121,6 +128,7 @@ class SmartLinkController extends AbstractStandardFormController
|
|||||||
* also displayed above the form of a link), and the number of hits of each link.
|
* also displayed above the form of a link), and the number of hits of each link.
|
||||||
*
|
*
|
||||||
* @param array<string, mixed> $args
|
* @param array<string, mixed> $args
|
||||||
|
* @param string $action
|
||||||
*
|
*
|
||||||
* @return array<string, mixed>
|
* @return array<string, mixed>
|
||||||
*/
|
*/
|
||||||
@@ -149,6 +157,8 @@ class SmartLinkController extends AbstractStandardFormController
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Smart Links don't have a detail page; after Save or Cancel go back to the list.
|
* Smart Links don't have a detail page; after Save or Cancel go back to the list.
|
||||||
|
*
|
||||||
|
* @param string $action
|
||||||
*/
|
*/
|
||||||
protected function getPostActionControllerAction($action): string
|
protected function getPostActionControllerAction($action): string
|
||||||
{
|
{
|
||||||
@@ -157,9 +167,11 @@ class SmartLinkController extends AbstractStandardFormController
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* A saved Smart Link is never cloned: its slug is immutable, and a clone would need a new one.
|
* A saved Smart Link is never cloned: its slug is immutable, and a clone would need a new one.
|
||||||
|
*
|
||||||
|
* @param int|null $objectId
|
||||||
*/
|
*/
|
||||||
public function cloneAction(Request $request, $objectId): Response
|
public function cloneAction(Request $request, $objectId): Response
|
||||||
{
|
{
|
||||||
$this->accessDenied();
|
$this->throwAccessDenied();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -13,7 +13,7 @@ use Symfony\Component\HttpFoundation\Response;
|
|||||||
* core's standard CRUD flow. Stakeholders are independent of programs; programs link to them from their
|
* core's standard CRUD flow. Stakeholders are independent of programs; programs link to them from their
|
||||||
* Stakeholders tab.
|
* Stakeholders tab.
|
||||||
*
|
*
|
||||||
* Model mt3smp.stakeholder (mt3s.marketing_program.model.stakeholder), permission base mt3smarketingprogram:stakeholders,
|
* Model mt3smarketingprogram.stakeholder (mautic.mt3smarketingprogram.model.stakeholder), permission base mt3smarketingprogram:stakeholders,
|
||||||
* translation base mt3s.marketing_program.stakeholder.
|
* translation base mt3s.marketing_program.stakeholder.
|
||||||
*/
|
*/
|
||||||
class StakeholderController extends AbstractStandardFormController
|
class StakeholderController extends AbstractStandardFormController
|
||||||
@@ -23,7 +23,7 @@ class StakeholderController extends AbstractStandardFormController
|
|||||||
|
|
||||||
protected function getModelName(): string
|
protected function getModelName(): string
|
||||||
{
|
{
|
||||||
return 'mt3smp.stakeholder';
|
return 'mt3smarketingprogram.stakeholder';
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getTemplateBase(): string
|
protected function getTemplateBase(): string
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ use Symfony\Component\HttpFoundation\Response;
|
|||||||
/**
|
/**
|
||||||
* List, create, edit and delete tasks (Programs > Tasks), using core's standard CRUD flow.
|
* List, create, edit and delete tasks (Programs > Tasks), using core's standard CRUD flow.
|
||||||
*
|
*
|
||||||
* Model mt3smp.task (mt3s.marketing_program.model.task), permission base mt3smarketingprogram:tasks, translation base mt3s.marketing_program.task.
|
* Model mt3smarketingprogram.task (mautic.mt3smarketingprogram.model.task), permission base mt3smarketingprogram:tasks, translation base mt3s.marketing_program.task.
|
||||||
*
|
*
|
||||||
* Where the user lands after Save or Cancel depends on where the task form was opened from:
|
* Where the user lands after Save or Cancel depends on where the task form was opened from:
|
||||||
* - from Programs > Tasks: back to the task list (core's default);
|
* - from Programs > Tasks: back to the task list (core's default);
|
||||||
@@ -51,7 +51,7 @@ class TaskController extends AbstractStandardFormController
|
|||||||
|
|
||||||
protected function getModelName(): string
|
protected function getModelName(): string
|
||||||
{
|
{
|
||||||
return 'mt3smp.task';
|
return 'mt3smarketingprogram.task';
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getTemplateBase(): string
|
protected function getTemplateBase(): string
|
||||||
@@ -137,6 +137,10 @@ class TaskController extends AbstractStandardFormController
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @param string $action
|
||||||
|
* @param int|null $objectId
|
||||||
|
* @param bool $isClone
|
||||||
|
*
|
||||||
* @return object|null
|
* @return object|null
|
||||||
*/
|
*/
|
||||||
protected function getFormEntity($action, &$objectId = null, &$isClone = false)
|
protected function getFormEntity($action, &$objectId = null, &$isClone = false)
|
||||||
@@ -144,7 +148,7 @@ class TaskController extends AbstractStandardFormController
|
|||||||
$entity = parent::getFormEntity($action, $objectId, $isClone);
|
$entity = parent::getFormEntity($action, $objectId, $isClone);
|
||||||
|
|
||||||
if ('new' === $action && $entity instanceof Task && null === $entity->getProgram() && null !== $this->preselectedProgramId) {
|
if ('new' === $action && $entity instanceof Task && null === $entity->getProgram() && null !== $this->preselectedProgramId) {
|
||||||
$program = $this->getModel('mt3smp.program')->getEntity($this->preselectedProgramId);
|
$program = $this->getModel('mt3smarketingprogram.program')->getEntity($this->preselectedProgramId);
|
||||||
if ($program instanceof Program) {
|
if ($program instanceof Program) {
|
||||||
$entity->setProgram($program);
|
$entity->setProgram($program);
|
||||||
}
|
}
|
||||||
@@ -153,6 +157,13 @@ class TaskController extends AbstractStandardFormController
|
|||||||
return $entity;
|
return $entity;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param Task $entity
|
||||||
|
* @param string $action
|
||||||
|
* @param mixed $pass
|
||||||
|
*
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
protected function afterEntitySave($entity, Form $form, $action, $pass = null)
|
protected function afterEntitySave($entity, Form $form, $action, $pass = null)
|
||||||
{
|
{
|
||||||
if ($entity instanceof Task) {
|
if ($entity instanceof Task) {
|
||||||
@@ -167,6 +178,7 @@ class TaskController extends AbstractStandardFormController
|
|||||||
* was moved to another program, go to its new program. Otherwise keep core's default: the task list.
|
* was moved to another program, go to its new program. Otherwise keep core's default: the task list.
|
||||||
*
|
*
|
||||||
* @param array<string, mixed> $args
|
* @param array<string, mixed> $args
|
||||||
|
* @param string $action
|
||||||
*
|
*
|
||||||
* @return array<string, mixed>
|
* @return array<string, mixed>
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -12,20 +12,20 @@ use Symfony\Component\HttpFoundation\Response;
|
|||||||
* Create, edit and delete UTM Taxonomies (Smart Links > UTM Taxonomies), using core's standard
|
* Create, edit and delete UTM Taxonomies (Smart Links > UTM Taxonomies), using core's standard
|
||||||
* CRUD flow.
|
* CRUD flow.
|
||||||
*
|
*
|
||||||
* Model smartlinks.utm_taxonomy (mautic.smartlinks.model.utm_taxonomy), permission base
|
* Model mt3smarketingprogram.utm_taxonomy (mautic.mt3smarketingprogram.model.utm_taxonomy), permission base
|
||||||
* smartlinks:taxonomies, translation base mautic.smartlinks.taxonomies.
|
* mt3smarketingprogram:taxonomies, translation base mt3s.smart_links.taxonomies.
|
||||||
*
|
*
|
||||||
* A taxonomy is never cloned: its name is unique, and a clone would collide immediately. A new
|
* A taxonomy is never cloned: its name is unique, and a clone would collide immediately. A new
|
||||||
* taxonomy is created from scratch.
|
* taxonomy is created from scratch.
|
||||||
*/
|
*/
|
||||||
class UtmTaxonomyController extends AbstractStandardFormController
|
class UtmTaxonomyController extends AbstractStandardFormController
|
||||||
{
|
{
|
||||||
public const ROUTE_INDEX = 'mautic_smartlinks_taxonomies';
|
public const ROUTE_INDEX = 'mt3s_smart_links_taxonomies';
|
||||||
public const ROUTE_ACTION = 'mautic_smartlinks_taxonomy_action';
|
public const ROUTE_ACTION = 'mt3s_smart_links_taxonomy_action';
|
||||||
|
|
||||||
protected function getModelName(): string
|
protected function getModelName(): string
|
||||||
{
|
{
|
||||||
return 'smartlinks.utm_taxonomy';
|
return 'mt3smarketingprogram.utm_taxonomy';
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getTemplateBase(): string
|
protected function getTemplateBase(): string
|
||||||
@@ -44,20 +44,20 @@ class UtmTaxonomyController extends AbstractStandardFormController
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Core derives the JS loader method from the model name; no Mautic.<prefix>OnLoad exists for
|
* The OnLoad JS prefix (no Mautic.mt3sMpUtmTaxonomyOnLoad exists: the form needs none),
|
||||||
* taxonomies (the form needs none), but the prefix stays deterministic for future use.
|
* deterministic for future use; core's fallback, the model name, would nothing listen to.
|
||||||
*/
|
*/
|
||||||
protected function getJsLoadMethodPrefix(): string
|
protected function getJsLoadMethodPrefix(): string
|
||||||
{
|
{
|
||||||
return 'smartlinksUtmTaxonomy';
|
return 'mt3sMpUtmTaxonomy';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Core builds mautic.<model name>; every key of the feature lives under mautic.smartlinks.taxonomies.
|
* Core builds mautic.<model name>; every key of the feature lives under mt3s.smart_links.taxonomies.
|
||||||
*/
|
*/
|
||||||
protected function getTranslationBase(): string
|
protected function getTranslationBase(): string
|
||||||
{
|
{
|
||||||
return 'mautic.smartlinks.taxonomies';
|
return 'mt3s.smart_links.taxonomies';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -97,6 +97,8 @@ class UtmTaxonomyController extends AbstractStandardFormController
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Taxonomies don't have a detail page; after Save or Cancel go back to the list.
|
* Taxonomies don't have a detail page; after Save or Cancel go back to the list.
|
||||||
|
*
|
||||||
|
* @param string $action
|
||||||
*/
|
*/
|
||||||
protected function getPostActionControllerAction($action): string
|
protected function getPostActionControllerAction($action): string
|
||||||
{
|
{
|
||||||
@@ -113,9 +115,11 @@ class UtmTaxonomyController extends AbstractStandardFormController
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* A saved taxonomy is never cloned: its name is unique, and a clone would collide on save.
|
* A saved taxonomy is never cloned: its name is unique, and a clone would collide on save.
|
||||||
|
*
|
||||||
|
* @param int|null $objectId
|
||||||
*/
|
*/
|
||||||
public function cloneAction(Request $request, $objectId): Response
|
public function cloneAction(Request $request, $objectId): Response
|
||||||
{
|
{
|
||||||
$this->accessDenied();
|
$this->throwAccessDenied();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+5
-3
@@ -163,8 +163,10 @@ class Program extends FormEntity implements DateRangeInterface
|
|||||||
->setCustomRepositoryClass(ProgramRepository::class)
|
->setCustomRepositoryClass(ProgramRepository::class)
|
||||||
->addIndex(['status'], 'program_status');
|
->addIndex(['status'], 'program_status');
|
||||||
|
|
||||||
// id and name; no description column (replaced by description items).
|
// id and name; no description column (replaced by description items). The false is
|
||||||
$builder->addIdColumns('name', false);
|
// core's own way to skip the column (addIdColumns checks it for truthiness); core's
|
||||||
|
// @param string docblock just doesn't mention it.
|
||||||
|
$builder->addIdColumns('name', false); // @phpstan-ignore argument.type (false is core's own way to skip the column; its @param string docblock doesn't mention it)
|
||||||
|
|
||||||
// Mapped on the raw metadata: ClassMetadataBuilder::addField() forces every string to VARCHAR(191).
|
// Mapped on the raw metadata: ClassMetadataBuilder::addField() forces every string to VARCHAR(191).
|
||||||
$metadata->mapField([
|
$metadata->mapField([
|
||||||
@@ -468,7 +470,7 @@ class Program extends FormEntity implements DateRangeInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @template T of ProgramObjective|ProgramDescriptionItem|ProgramAllocationItem|Audience|ProgramStakeholder
|
* @template T of ProgramObjective|ProgramDescriptionItem|ProgramAllocationItem|ProgramAudience|ProgramStakeholder
|
||||||
*
|
*
|
||||||
* @param Collection<int, T> $collection
|
* @param Collection<int, T> $collection
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -126,10 +126,10 @@ class SmartLink extends FormEntity
|
|||||||
|
|
||||||
public static function loadValidatorMetadata(ClassMetadata $metadata): void
|
public static function loadValidatorMetadata(ClassMetadata $metadata): void
|
||||||
{
|
{
|
||||||
$metadata->addPropertyConstraint('slug', new NotBlank(message: 'mautic.smartlinks.smart_links.error.slug_required'));
|
$metadata->addPropertyConstraint('slug', new NotBlank(message: 'mt3s.smart_links.smart_links.error.slug_required'));
|
||||||
$metadata->addPropertyConstraint('slug', new Length(
|
$metadata->addPropertyConstraint('slug', new Length(
|
||||||
max: self::SLUG_MAX_LENGTH,
|
max: self::SLUG_MAX_LENGTH,
|
||||||
maxMessage: 'mautic.smartlinks.smart_links.error.slug_length',
|
maxMessage: 'mt3s.smart_links.smart_links.error.slug_length',
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -71,10 +71,13 @@ class SmartLinkRepository extends CommonRepository
|
|||||||
$this->getTableAlias().'.destinationUrl',
|
$this->getTableAlias().'.destinationUrl',
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Hits column of the list sorts by the number of hits of each link: the virtual
|
* The Hits column of the list sorts by the number of hits of each link: the virtual
|
||||||
* "hitCount" order by maps to the HIDDEN hitCount scalar of the list query. Everything
|
* "hitCount" order by maps to the HIDDEN hitCount scalar of the list query. Everything
|
||||||
* else falls back to core's column handling.
|
* else falls back to core's column handling.
|
||||||
|
*
|
||||||
|
* @param array<string, mixed> $args
|
||||||
*/
|
*/
|
||||||
protected function buildOrderByClause($q, array $args): void
|
protected function buildOrderByClause($q, array $args): void
|
||||||
{
|
{
|
||||||
@@ -92,6 +95,7 @@ class SmartLinkRepository extends CommonRepository
|
|||||||
|
|
||||||
parent::buildOrderByClause($q, $args);
|
parent::buildOrderByClause($q, $args);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return array<array{0: string, 1: string}>
|
* @return array<array{0: string, 1: string}>
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -19,9 +19,10 @@ class StakeholderRepository extends CommonRepository
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The list's search box matches the name, email, role and type.
|
* The list's search box matches the name, email, role and type. Core passes the filter
|
||||||
|
* as an object with ->string and ->strict (its own docblock), not an array.
|
||||||
*
|
*
|
||||||
* @param array<int, mixed> $filter
|
* @param \stdClass $filter
|
||||||
*
|
*
|
||||||
* @return array<int, mixed>
|
* @return array<int, mixed>
|
||||||
*/
|
*/
|
||||||
|
|||||||
+1
-1
@@ -4,9 +4,9 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace MauticPlugin\MT3SMarketingProgramBundle\Entity;
|
namespace MauticPlugin\MT3SMarketingProgramBundle\Entity;
|
||||||
|
|
||||||
use Doctrine\DBAL\Types\Types;
|
|
||||||
use Doctrine\Common\Collections\ArrayCollection;
|
use Doctrine\Common\Collections\ArrayCollection;
|
||||||
use Doctrine\Common\Collections\Collection;
|
use Doctrine\Common\Collections\Collection;
|
||||||
|
use Doctrine\DBAL\Types\Types;
|
||||||
use Doctrine\ORM\Mapping\ClassMetadata as OrmClassMetadata;
|
use Doctrine\ORM\Mapping\ClassMetadata as OrmClassMetadata;
|
||||||
use Mautic\CoreBundle\Doctrine\Mapping\ClassMetadataBuilder;
|
use Mautic\CoreBundle\Doctrine\Mapping\ClassMetadataBuilder;
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ use Symfony\Component\Form\DataTransformerInterface;
|
|||||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Converts between the stored `smartlinks_utm_config` array (parameters keyed by their key)
|
* Converts between the stored `mt3s_smart_links_utm_config` array (parameters keyed by their key)
|
||||||
* and the form structure (catalog parameters + a collection of custom parameters).
|
* and the form structure (catalog parameters + a collection of custom parameters).
|
||||||
*
|
*
|
||||||
* @implements DataTransformerInterface<mixed, array<string, mixed>>
|
* @implements DataTransformerInterface<mixed, array<string, mixed>>
|
||||||
|
|||||||
@@ -14,8 +14,6 @@ use Symfony\Component\Form\FormBuilderInterface;
|
|||||||
* the Email form (EmailType) and the Focus Item form (FocusType), so this covers both.
|
* the Email form (EmailType) and the Focus Item form (FocusType), so this covers both.
|
||||||
*
|
*
|
||||||
* Registered as `form.type_extension` by autoconfiguration (Config/services.php).
|
* Registered as `form.type_extension` by autoconfiguration (Config/services.php).
|
||||||
*
|
|
||||||
* @extends AbstractTypeExtension<mixed>
|
|
||||||
*/
|
*/
|
||||||
final class UtmTagsTypeExtension extends AbstractTypeExtension
|
final class UtmTagsTypeExtension extends AbstractTypeExtension
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -28,8 +28,6 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
|
|||||||
* fixed type (persona, ICP, …), the segments (purely informational), then the persona attributes
|
* fixed type (persona, ICP, …), the segments (purely informational), then the persona attributes
|
||||||
* the admin switched on in Settings > Configuration > Program Settings (AudienceAttributes): one
|
* the admin switched on in Settings > Configuration > Program Settings (AudienceAttributes): one
|
||||||
* toggle per attribute, so a b2b install and a b2c install define their personas differently.
|
* toggle per attribute, so a b2b install and a b2c install define their personas differently.
|
||||||
*
|
|
||||||
* @extends AbstractType<Audience>
|
|
||||||
*/
|
*/
|
||||||
class AudienceType extends AbstractType
|
class AudienceType extends AbstractType
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -4,13 +4,13 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace MauticPlugin\MT3SMarketingProgramBundle\Form\Type;
|
namespace MauticPlugin\MT3SMarketingProgramBundle\Form\Type;
|
||||||
|
|
||||||
|
use Mautic\CoreBundle\Form\Type\YesNoButtonGroupType;
|
||||||
use MauticPlugin\MT3SMarketingProgramBundle\Model\StakeholderModel;
|
use MauticPlugin\MT3SMarketingProgramBundle\Model\StakeholderModel;
|
||||||
use MauticPlugin\MT3SMarketingProgramBundle\Service\CurrencyProvider;
|
|
||||||
use MauticPlugin\MT3SMarketingProgramBundle\Service\AudienceAttributes;
|
use MauticPlugin\MT3SMarketingProgramBundle\Service\AudienceAttributes;
|
||||||
|
use MauticPlugin\MT3SMarketingProgramBundle\Service\CurrencyProvider;
|
||||||
use Symfony\Component\Form\AbstractType;
|
use Symfony\Component\Form\AbstractType;
|
||||||
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
|
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
|
||||||
use Symfony\Component\Form\Extension\Core\Type\TextType;
|
use Symfony\Component\Form\Extension\Core\Type\TextType;
|
||||||
use Mautic\CoreBundle\Form\Type\YesNoButtonGroupType;
|
|
||||||
use Symfony\Component\Form\FormBuilderInterface;
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
use Symfony\Component\Validator\Constraints\NotBlank;
|
use Symfony\Component\Validator\Constraints\NotBlank;
|
||||||
|
|
||||||
@@ -24,8 +24,6 @@ use Symfony\Component\Validator\Constraints\NotBlank;
|
|||||||
*
|
*
|
||||||
* The item type lists moved to their own page under Programs (ItemTypesController, Programs >
|
* The item type lists moved to their own page under Programs (ItemTypesController, Programs >
|
||||||
* Item types).
|
* Item types).
|
||||||
*
|
|
||||||
* @extends AbstractType<array<string, mixed>>
|
|
||||||
*/
|
*/
|
||||||
class ConfigType extends AbstractType
|
class ConfigType extends AbstractType
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -25,8 +25,6 @@ use Symfony\Component\Validator\Constraints\NotBlank;
|
|||||||
*
|
*
|
||||||
* The key is hidden. It is generated when the type is created and never changes, so that renaming a
|
* The key is hidden. It is generated when the type is created and never changes, so that renaming a
|
||||||
* type doesn't affect the items that use it.
|
* type doesn't affect the items that use it.
|
||||||
*
|
|
||||||
* @extends AbstractType<array<string, mixed>>
|
|
||||||
*/
|
*/
|
||||||
class ItemTypeConfigType extends AbstractType
|
class ItemTypeConfigType extends AbstractType
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -17,8 +17,6 @@ use Symfony\Component\Form\FormBuilderInterface;
|
|||||||
* an audience's decision roles and tones. Each child is one of ItemTypeProvider::PARAMETERS,
|
* an audience's decision roles and tones. Each child is one of ItemTypeProvider::PARAMETERS,
|
||||||
* keyed exactly by the local.php parameter that stores the list, so saving is a straight merge
|
* keyed exactly by the local.php parameter that stores the list, so saving is a straight merge
|
||||||
* into the local configuration.
|
* into the local configuration.
|
||||||
*
|
|
||||||
* @extends AbstractType<array<string, mixed>>
|
|
||||||
*/
|
*/
|
||||||
class ItemTypesType extends AbstractType
|
class ItemTypesType extends AbstractType
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -21,8 +21,6 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
|
|||||||
* real cost (both in the general currency). Works like ProgramDescriptionItemType (type description shown
|
* real cost (both in the general currency). Works like ProgramDescriptionItemType (type description shown
|
||||||
* under the dropdown and its pictogram next to it, hidden position kept in display order by
|
* under the dropdown and its pictogram next to it, hidden position kept in display order by
|
||||||
* Assets/js/mt3s-mp-program.js).
|
* Assets/js/mt3s-mp-program.js).
|
||||||
*
|
|
||||||
* @extends AbstractType<ProgramAllocationItem>
|
|
||||||
*/
|
*/
|
||||||
class ProgramAllocationItemType extends AbstractType
|
class ProgramAllocationItemType extends AbstractType
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -20,8 +20,6 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
|
|||||||
* One row of the audiences collection in ProgramType: an audience of the global directory (only the
|
* One row of the audiences collection in ProgramType: an audience of the global directory (only the
|
||||||
* active ones are offered), the audience's priority in this plan, and possibly a program-specific
|
* active ones are offered), the audience's priority in this plan, and possibly a program-specific
|
||||||
* message. The position field is hidden and kept in display order by Assets/js/mt3s-mp-program.js.
|
* message. The position field is hidden and kept in display order by Assets/js/mt3s-mp-program.js.
|
||||||
*
|
|
||||||
* @extends AbstractType<ProgramAudience>
|
|
||||||
*/
|
*/
|
||||||
class ProgramAudienceType extends AbstractType
|
class ProgramAudienceType extends AbstractType
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -18,8 +18,6 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
|
|||||||
* types set up in Settings > Configuration > Program; each option carries the type's description, which
|
* types set up in Settings > Configuration > Program; each option carries the type's description, which
|
||||||
* Assets/js/mt3s-mp-program.js shows under the dropdown. The position field is hidden and kept in display order by
|
* Assets/js/mt3s-mp-program.js shows under the dropdown. The position field is hidden and kept in display order by
|
||||||
* mt3s-mp-program.js.
|
* mt3s-mp-program.js.
|
||||||
*
|
|
||||||
* @extends AbstractType<ProgramDescriptionItem>
|
|
||||||
*/
|
*/
|
||||||
class ProgramDescriptionItemType extends AbstractType
|
class ProgramDescriptionItemType extends AbstractType
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -20,8 +20,6 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
|
|||||||
* One row of the objectives collection in ProgramType: type, title, priority, description and the achieved
|
* One row of the objectives collection in ProgramType: type, title, priority, description and the achieved
|
||||||
* flag. Works like ProgramDescriptionItemType (type description shown under the dropdown and its pictogram
|
* flag. Works like ProgramDescriptionItemType (type description shown under the dropdown and its pictogram
|
||||||
* next to it, hidden position kept in display order by Assets/js/mt3s-mp-program.js).
|
* next to it, hidden position kept in display order by Assets/js/mt3s-mp-program.js).
|
||||||
*
|
|
||||||
* @extends AbstractType<ProgramObjective>
|
|
||||||
*/
|
*/
|
||||||
class ProgramObjectiveType extends AbstractType
|
class ProgramObjectiveType extends AbstractType
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -18,8 +18,6 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
|
|||||||
* One row of the stakeholders collection in ProgramType: a stakeholder of the global directory (only the
|
* One row of the stakeholders collection in ProgramType: a stakeholder of the global directory (only the
|
||||||
* active ones are offered) and the stakeholder's role in this plan. The position field is hidden and
|
* active ones are offered) and the stakeholder's role in this plan. The position field is hidden and
|
||||||
* kept in display order by Assets/js/mt3s-mp-program.js.
|
* kept in display order by Assets/js/mt3s-mp-program.js.
|
||||||
*
|
|
||||||
* @extends AbstractType<ProgramStakeholder>
|
|
||||||
*/
|
*/
|
||||||
class ProgramStakeholderType extends AbstractType
|
class ProgramStakeholderType extends AbstractType
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -16,8 +16,6 @@ use Mautic\UserBundle\Form\Type\UserListType;
|
|||||||
use MauticPlugin\MT3SMarketingProgramBundle\Entity\Program;
|
use MauticPlugin\MT3SMarketingProgramBundle\Entity\Program;
|
||||||
use MauticPlugin\MT3SMarketingProgramBundle\Entity\ProgramStatus;
|
use MauticPlugin\MT3SMarketingProgramBundle\Entity\ProgramStatus;
|
||||||
use MauticPlugin\MT3SMarketingProgramBundle\Service\CurrencyProvider;
|
use MauticPlugin\MT3SMarketingProgramBundle\Service\CurrencyProvider;
|
||||||
use MauticPlugin\MT3SMarketingProgramBundle\Form\Type\ProgramAudienceType;
|
|
||||||
use MauticPlugin\MT3SMarketingProgramBundle\Form\Type\ProgramStakeholderType;
|
|
||||||
use Symfony\Component\Form\AbstractType;
|
use Symfony\Component\Form\AbstractType;
|
||||||
use Symfony\Component\Form\Extension\Core\Type\CollectionType;
|
use Symfony\Component\Form\Extension\Core\Type\CollectionType;
|
||||||
use Symfony\Component\Form\Extension\Core\Type\EnumType;
|
use Symfony\Component\Form\Extension\Core\Type\EnumType;
|
||||||
@@ -27,9 +25,6 @@ use Symfony\Component\Form\Extension\Core\Type\TextType;
|
|||||||
use Symfony\Component\Form\FormBuilderInterface;
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||||
|
|
||||||
/**
|
|
||||||
* @extends AbstractType<Program>
|
|
||||||
*/
|
|
||||||
class ProgramType extends AbstractType
|
class ProgramType extends AbstractType
|
||||||
{
|
{
|
||||||
public function __construct(
|
public function __construct(
|
||||||
|
|||||||
+22
-25
@@ -48,8 +48,6 @@ use Symfony\Contracts\Translation\TranslatorInterface;
|
|||||||
* data-show-on switcher shows the fieldset of the chosen taxonomy; the values posted for
|
* data-show-on switcher shows the fieldset of the chosen taxonomy; the values posted for
|
||||||
* the others are dropped on submit. A stored value outside the list stays selectable,
|
* the others are dropped on submit. A stored value outside the list stays selectable,
|
||||||
* labelled "(not in taxonomy)", so an old link is still editable.
|
* labelled "(not in taxonomy)", so an old link is still editable.
|
||||||
*
|
|
||||||
* @extends AbstractType<SmartLink>
|
|
||||||
*/
|
*/
|
||||||
final class SmartLinkType extends AbstractType
|
final class SmartLinkType extends AbstractType
|
||||||
{
|
{
|
||||||
@@ -84,22 +82,22 @@ final class SmartLinkType extends AbstractType
|
|||||||
// on save, exactly like the live preview does. The constraints only guard the raw input;
|
// on save, exactly like the live preview does. The constraints only guard the raw input;
|
||||||
// spaces are allowed here because they are turned into the separator on save.
|
// spaces are allowed here because they are turned into the separator on save.
|
||||||
$builder->add('slug', TextType::class, [
|
$builder->add('slug', TextType::class, [
|
||||||
'label' => 'mautic.smartlinks.smart_links.slug',
|
'label' => 'mt3s.smart_links.smart_links.slug',
|
||||||
'required' => true,
|
'required' => true,
|
||||||
'disabled' => $isSaved,
|
'disabled' => $isSaved,
|
||||||
'attr' => [
|
'attr' => [
|
||||||
'class' => 'form-control smart-link-slug',
|
'class' => 'form-control smart-link-slug',
|
||||||
'maxlength' => SmartLink::SLUG_MAX_LENGTH,
|
'maxlength' => SmartLink::SLUG_MAX_LENGTH,
|
||||||
'tooltip' => 'mautic.smartlinks.smart_links.slug.tooltip',
|
'tooltip' => 'mt3s.smart_links.smart_links.slug.tooltip',
|
||||||
// Live preview of the short link: the JS fills the span next to the field.
|
// Live preview of the short link: the JS fills the span next to the field.
|
||||||
'data-preview' => 'smart-link-preview',
|
'data-preview' => 'smart-link-preview',
|
||||||
],
|
],
|
||||||
'constraints' => $isSaved ? [] : [
|
'constraints' => $isSaved ? [] : [
|
||||||
new NotBlank(message: 'mautic.smartlinks.smart_links.error.slug_required'),
|
new NotBlank(message: 'mt3s.smart_links.smart_links.error.slug_required'),
|
||||||
new Length(max: SmartLink::SLUG_MAX_LENGTH, maxMessage: 'mautic.smartlinks.smart_links.error.slug_length'),
|
new Length(max: SmartLink::SLUG_MAX_LENGTH, maxMessage: 'mt3s.smart_links.smart_links.error.slug_length'),
|
||||||
new Regex(
|
new Regex(
|
||||||
pattern: '/^[\p{L}0-9\-_. ]*$/u',
|
pattern: '/^[\p{L}0-9\-_. ]*$/u',
|
||||||
message: 'mautic.smartlinks.smart_links.error.slug_characters'
|
message: 'mt3s.smart_links.smart_links.error.slug_characters'
|
||||||
),
|
),
|
||||||
new Callback(callback: $this->validateSlug(...)),
|
new Callback(callback: $this->validateSlug(...)),
|
||||||
],
|
],
|
||||||
@@ -107,40 +105,40 @@ final class SmartLinkType extends AbstractType
|
|||||||
|
|
||||||
// -- Redirect ------------------------------------------------------------
|
// -- Redirect ------------------------------------------------------------
|
||||||
$builder->add('redirectType', EnumType::class, [
|
$builder->add('redirectType', EnumType::class, [
|
||||||
'label' => 'mautic.smartlinks.smart_links.redirect_type',
|
'label' => 'mt3s.smart_links.smart_links.redirect_type',
|
||||||
'class' => SmartLinkRedirectType::class,
|
'class' => SmartLinkRedirectType::class,
|
||||||
'choice_label' => fn (SmartLinkRedirectType $type): string => $this->translator->trans($type->getLabelKey()),
|
'choice_label' => fn (SmartLinkRedirectType $type): string => $this->translator->trans($type->getLabelKey()),
|
||||||
'attr' => ['class' => 'form-control smart-link-redirect-type'],
|
'attr' => ['class' => 'form-control smart-link-redirect-type'],
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$builder->add('redirectCode', EnumType::class, [
|
$builder->add('redirectCode', EnumType::class, [
|
||||||
'label' => 'mautic.smartlinks.smart_links.redirect_code',
|
'label' => 'mt3s.smart_links.smart_links.redirect_code',
|
||||||
'class' => SmartLinkRedirectCode::class,
|
'class' => SmartLinkRedirectCode::class,
|
||||||
'choice_label' => fn (SmartLinkRedirectCode $code): string => $code->getTranslatedLabel($this->translator),
|
'choice_label' => fn (SmartLinkRedirectCode $code): string => $code->getTranslatedLabel($this->translator),
|
||||||
'attr' => ['class' => 'form-control smart-link-redirect-code'],
|
'attr' => ['class' => 'form-control smart-link-redirect-code'],
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$builder->add('destinationUrl', UrlType::class, [
|
$builder->add('destinationUrl', UrlType::class, [
|
||||||
'label' => 'mautic.smartlinks.smart_links.destination_url',
|
'label' => 'mt3s.smart_links.smart_links.destination_url',
|
||||||
'required' => false,
|
'required' => false,
|
||||||
'attr' => [
|
'attr' => [
|
||||||
'class' => 'form-control smart-link-destination',
|
'class' => 'form-control smart-link-destination',
|
||||||
'tooltip' => 'mautic.smartlinks.smart_links.destination_url.tooltip',
|
'tooltip' => 'mt3s.smart_links.smart_links.destination_url.tooltip',
|
||||||
],
|
],
|
||||||
'constraints' => [new Callback(callback: $this->validateDestination(...))],
|
'constraints' => [new Callback(callback: $this->validateDestination(...))],
|
||||||
]);
|
]);
|
||||||
|
|
||||||
// -- Mautic destination: a landing page or a standalone form -------------------------
|
// -- Mautic destination: a landing page or a standalone form -------------------------
|
||||||
$builder->add('destination', ChoiceType::class, [
|
$builder->add('destination', ChoiceType::class, [
|
||||||
'label' => 'mautic.smartlinks.smart_links.destination',
|
'label' => 'mt3s.smart_links.smart_links.destination',
|
||||||
'required' => false,
|
'required' => false,
|
||||||
'mapped' => false,
|
'mapped' => false,
|
||||||
'attr' => [
|
'attr' => [
|
||||||
'class' => 'form-control smart-link-mautic-destination',
|
'class' => 'form-control smart-link-mautic-destination',
|
||||||
'tooltip' => 'mautic.smartlinks.smart_links.destination.tooltip',
|
'tooltip' => 'mt3s.smart_links.smart_links.destination.tooltip',
|
||||||
],
|
],
|
||||||
'choices' => $this->buildMauticDestinationChoices($smartLink),
|
'choices' => $this->buildMauticDestinationChoices($smartLink),
|
||||||
'placeholder' => 'mautic.smartlinks.form.choose',
|
'placeholder' => 'mt3s.smart_links.form.choose',
|
||||||
'data' => $this->currentMauticDestination($smartLink),
|
'data' => $this->currentMauticDestination($smartLink),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
@@ -150,16 +148,16 @@ final class SmartLinkType extends AbstractType
|
|||||||
// taxonomy that is no longer published stays selectable, so an old link is still
|
// taxonomy that is no longer published stays selectable, so an old link is still
|
||||||
// editable (a new one can always be chosen instead).
|
// editable (a new one can always be chosen instead).
|
||||||
$builder->add('taxonomy', ChoiceType::class, [
|
$builder->add('taxonomy', ChoiceType::class, [
|
||||||
'label' => 'mautic.smartlinks.smart_links.taxonomy',
|
'label' => 'mt3s.smart_links.smart_links.taxonomy',
|
||||||
'required' => true,
|
'required' => true,
|
||||||
'placeholder' => 'mautic.smartlinks.form.choose',
|
'placeholder' => 'mt3s.smart_links.form.choose',
|
||||||
'choices' => $this->buildTaxonomyChoices($smartLink),
|
'choices' => $this->buildTaxonomyChoices($smartLink),
|
||||||
'choice_value' => fn (?UtmTaxonomy $taxonomy): string => (string) ($taxonomy?->getId() ?? ''),
|
'choice_value' => fn (?UtmTaxonomy $taxonomy): string => (string) ($taxonomy?->getId() ?? ''),
|
||||||
'attr' => [
|
'attr' => [
|
||||||
'class' => 'form-control smart-link-taxonomy',
|
'class' => 'form-control smart-link-taxonomy',
|
||||||
'tooltip' => 'mautic.smartlinks.smart_links.taxonomy.tooltip',
|
'tooltip' => 'mt3s.smart_links.smart_links.taxonomy.tooltip',
|
||||||
],
|
],
|
||||||
'constraints' => [new NotBlank(message: 'mautic.smartlinks.smart_links.error.taxonomy_required')],
|
'constraints' => [new NotBlank(message: 'mt3s.smart_links.smart_links.error.taxonomy_required')],
|
||||||
]);
|
]);
|
||||||
|
|
||||||
// -- UTM parameters ------------------------------------------------------------
|
// -- UTM parameters ------------------------------------------------------------
|
||||||
@@ -183,7 +181,6 @@ final class SmartLinkType extends AbstractType
|
|||||||
$this->buildTaxonomyFieldOptions($taxonomy, $key, $smartLink)
|
$this->buildTaxonomyFieldOptions($taxonomy, $key, $smartLink)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// The stored values (parameter key => value) feed the fieldset children
|
// The stored values (parameter key => value) feed the fieldset children
|
||||||
@@ -322,7 +319,7 @@ final class SmartLinkType extends AbstractType
|
|||||||
foreach ($this->getFormTaxonomies($smartLink) as $taxonomy) {
|
foreach ($this->getFormTaxonomies($smartLink) as $taxonomy) {
|
||||||
$label = (string) $taxonomy->getName();
|
$label = (string) $taxonomy->getName();
|
||||||
if (!$taxonomy->isPublished()) {
|
if (!$taxonomy->isPublished()) {
|
||||||
$label = $this->translator->trans('mautic.smartlinks.taxonomies.unpublished_choice', ['%name%' => $label]);
|
$label = $this->translator->trans('mt3s.smart_links.taxonomies.unpublished_choice', ['%name%' => $label]);
|
||||||
}
|
}
|
||||||
|
|
||||||
$choices[$label] = $taxonomy;
|
$choices[$label] = $taxonomy;
|
||||||
@@ -348,7 +345,7 @@ final class SmartLinkType extends AbstractType
|
|||||||
$stored = (string) ($smartLink->getUtmParameters()[$key] ?? '');
|
$stored = (string) ($smartLink->getUtmParameters()[$key] ?? '');
|
||||||
if ('' !== $stored && !\in_array($stored, $choices, true)) {
|
if ('' !== $stored && !\in_array($stored, $choices, true)) {
|
||||||
$choices = [
|
$choices = [
|
||||||
$this->translator->trans('mautic.smartlinks.form.legacy_choice', ['%value%' => $stored]) => $stored,
|
$this->translator->trans('mt3s.smart_links.form.legacy_choice', ['%value%' => $stored]) => $stored,
|
||||||
] + $choices;
|
] + $choices;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -358,7 +355,7 @@ final class SmartLinkType extends AbstractType
|
|||||||
'label' => (string) ($parameter['label'] ?? $key),
|
'label' => (string) ($parameter['label'] ?? $key),
|
||||||
'required' => false,
|
'required' => false,
|
||||||
'choices' => $choices,
|
'choices' => $choices,
|
||||||
'placeholder' => 'mautic.smartlinks.form.choose',
|
'placeholder' => 'mt3s.smart_links.form.choose',
|
||||||
'attr' => ['class' => 'form-control smart-link-utm'],
|
'attr' => ['class' => 'form-control smart-link-utm'],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
@@ -511,14 +508,14 @@ final class SmartLinkType extends AbstractType
|
|||||||
$pages = $this->getPageRepository()->findBy(['isPublished' => true], ['title' => 'ASC']);
|
$pages = $this->getPageRepository()->findBy(['isPublished' => true], ['title' => 'ASC']);
|
||||||
foreach ($pages as $page) {
|
foreach ($pages as $page) {
|
||||||
$value = 'page:'.$page->getId();
|
$value = 'page:'.$page->getId();
|
||||||
$choices['mautic.smartlinks.smart_links.destination.pages'][$page->getTitle()] = $value;
|
$choices['mt3s.smart_links.smart_links.destination.pages'][$page->getTitle()] = $value;
|
||||||
$values[] = $value;
|
$values[] = $value;
|
||||||
}
|
}
|
||||||
|
|
||||||
$forms = $this->getFormRepository()->findBy(['isPublished' => true], ['name' => 'ASC']);
|
$forms = $this->getFormRepository()->findBy(['isPublished' => true], ['name' => 'ASC']);
|
||||||
foreach ($forms as $form) {
|
foreach ($forms as $form) {
|
||||||
$value = 'form:'.$form->getId();
|
$value = 'form:'.$form->getId();
|
||||||
$choices['mautic.smartlinks.smart_links.destination.forms'][$form->getName()] = $value;
|
$choices['mt3s.smart_links.smart_links.destination.forms'][$form->getName()] = $value;
|
||||||
$values[] = $value;
|
$values[] = $value;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -529,7 +526,7 @@ final class SmartLinkType extends AbstractType
|
|||||||
$current = $this->currentMauticDestination($smartLink);
|
$current = $this->currentMauticDestination($smartLink);
|
||||||
if (null !== $current && !in_array($current, $values, true)) {
|
if (null !== $current && !in_array($current, $values, true)) {
|
||||||
$label = $smartLink->getPage()?->getTitle() ?? $smartLink->getForm()?->getName() ?? '';
|
$label = $smartLink->getPage()?->getTitle() ?? $smartLink->getForm()?->getName() ?? '';
|
||||||
$choices['mautic.smartlinks.smart_links.destination.unpublished'][$label] = $current;
|
$choices['mt3s.smart_links.smart_links.destination.unpublished'][$label] = $current;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $choices;
|
return $choices;
|
||||||
|
|||||||
@@ -14,13 +14,14 @@ use Symfony\Component\Form\FormBuilderInterface;
|
|||||||
* The single "Smart Links Settings" tab of Settings > Configuration: the general UTM rules and
|
* The single "Smart Links Settings" tab of Settings > Configuration: the general UTM rules and
|
||||||
* the short link domain (section "UTM Settings"), the catalog and custom parameters (section
|
* the short link domain (section "UTM Settings"), the catalog and custom parameters (section
|
||||||
* "Parameters"). Each child is a local.php parameter.
|
* "Parameters"). Each child is a local.php parameter.
|
||||||
*
|
|
||||||
* @extends AbstractType<array<string, mixed>>
|
|
||||||
*/
|
*/
|
||||||
final class SmartLinksConfigType extends AbstractType
|
final class SmartLinksConfigType extends AbstractType
|
||||||
{
|
{
|
||||||
/** Stored in local.php under this key (an array: short_link_domain => domain). */
|
/** Stored in local.php under this key (an array: short_link_domain => domain). */
|
||||||
public const CONFIG_PARAMETER = 'smartlinks_config';
|
public const CONFIG_PARAMETER = 'mt3s_smart_links_config';
|
||||||
|
|
||||||
|
/** Key of the standalone SmartlinksBundle era (0.1.0–0.18.0); still honored until the domain is saved again. */
|
||||||
|
public const LEGACY_SMARTLINKS_PARAMETER = 'smartlinks_config';
|
||||||
|
|
||||||
/** Key of the UtmManagerBundle era (< 0.5.0); still honored until the domain is saved again. */
|
/** Key of the UtmManagerBundle era (< 0.5.0); still honored until the domain is saved again. */
|
||||||
public const LEGACY_CONFIG_PARAMETER = 'utm_manager_smart_links';
|
public const LEGACY_CONFIG_PARAMETER = 'utm_manager_smart_links';
|
||||||
@@ -33,11 +34,11 @@ final class SmartLinksConfigType extends AbstractType
|
|||||||
$builder->add(self::CONFIG_PARAMETER, FormType::class, ['label' => false]);
|
$builder->add(self::CONFIG_PARAMETER, FormType::class, ['label' => false]);
|
||||||
|
|
||||||
$builder->get(self::CONFIG_PARAMETER)->add('short_link_domain', TextType::class, [
|
$builder->get(self::CONFIG_PARAMETER)->add('short_link_domain', TextType::class, [
|
||||||
'label' => 'mautic.smartlinks.settings.short_link_domain',
|
'label' => 'mt3s.smart_links.settings.short_link_domain',
|
||||||
'required' => false,
|
'required' => false,
|
||||||
'attr' => [
|
'attr' => [
|
||||||
'class' => 'form-control',
|
'class' => 'form-control',
|
||||||
'tooltip' => 'mautic.smartlinks.settings.short_link_domain.tooltip',
|
'tooltip' => 'mt3s.smart_links.settings.short_link_domain.tooltip',
|
||||||
],
|
],
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,9 +16,7 @@ use Symfony\Component\Form\FormBuilderInterface;
|
|||||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The `smartlinks_utm_config` parameter: general settings, catalog parameters and custom parameters.
|
* The `mt3s_smart_links_utm_config` parameter: general settings, catalog parameters and custom parameters.
|
||||||
*
|
|
||||||
* @extends AbstractType<array<string, mixed>>
|
|
||||||
*/
|
*/
|
||||||
final class SmartlinksSettingsType extends AbstractType
|
final class SmartlinksSettingsType extends AbstractType
|
||||||
{
|
{
|
||||||
@@ -31,23 +29,23 @@ final class SmartlinksSettingsType extends AbstractType
|
|||||||
public function buildForm(FormBuilderInterface $builder, array $options): void
|
public function buildForm(FormBuilderInterface $builder, array $options): void
|
||||||
{
|
{
|
||||||
$builder->add('enforce_lowercase', YesNoButtonGroupType::class, [
|
$builder->add('enforce_lowercase', YesNoButtonGroupType::class, [
|
||||||
'label' => 'mautic.smartlinks.config.enforce_lowercase',
|
'label' => 'mt3s.smart_links.config.enforce_lowercase',
|
||||||
'attr' => ['tooltip' => 'mautic.smartlinks.config.enforce_lowercase.tooltip'],
|
'attr' => ['tooltip' => 'mt3s.smart_links.config.enforce_lowercase.tooltip'],
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$builder->add('separator_replacement', ChoiceType::class, [
|
$builder->add('separator_replacement', ChoiceType::class, [
|
||||||
'label' => 'mautic.smartlinks.config.separator_replacement',
|
'label' => 'mt3s.smart_links.config.separator_replacement',
|
||||||
'choices' => [
|
'choices' => [
|
||||||
'mautic.smartlinks.config.separator.hyphen' => '-',
|
'mt3s.smart_links.config.separator.hyphen' => '-',
|
||||||
'mautic.smartlinks.config.separator.underscore' => '_',
|
'mt3s.smart_links.config.separator.underscore' => '_',
|
||||||
'mautic.smartlinks.config.separator.dot' => '.',
|
'mt3s.smart_links.config.separator.dot' => '.',
|
||||||
],
|
],
|
||||||
'placeholder' => false,
|
'placeholder' => false,
|
||||||
'attr' => [
|
'attr' => [
|
||||||
'class' => 'form-control',
|
'class' => 'form-control',
|
||||||
'tooltip' => 'mautic.smartlinks.config.separator_replacement.tooltip',
|
'tooltip' => 'mt3s.smart_links.config.separator_replacement.tooltip',
|
||||||
],
|
],
|
||||||
'invalid_message' => 'mautic.smartlinks.config.error.separator_invalid',
|
'invalid_message' => 'mt3s.smart_links.config.error.separator_invalid',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$parameters = $builder->create('parameters', FormType::class, ['label' => false]);
|
$parameters = $builder->create('parameters', FormType::class, ['label' => false]);
|
||||||
@@ -85,6 +83,6 @@ final class SmartlinksSettingsType extends AbstractType
|
|||||||
|
|
||||||
public function getBlockPrefix(): string
|
public function getBlockPrefix(): string
|
||||||
{
|
{
|
||||||
return 'smartlinks_utm_settings';
|
return 'mt3s_smart_links_utm_settings';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -4,10 +4,10 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace MauticPlugin\MT3SMarketingProgramBundle\Form\Type;
|
namespace MauticPlugin\MT3SMarketingProgramBundle\Form\Type;
|
||||||
|
|
||||||
use MauticPlugin\MT3SMarketingProgramBundle\Entity\Stakeholder;
|
|
||||||
use MauticPlugin\MT3SMarketingProgramBundle\Service\ItemTypeProvider;
|
|
||||||
use Mautic\CoreBundle\Form\Type\FormButtonsType;
|
use Mautic\CoreBundle\Form\Type\FormButtonsType;
|
||||||
use Mautic\CoreBundle\Form\Type\YesNoButtonGroupType;
|
use Mautic\CoreBundle\Form\Type\YesNoButtonGroupType;
|
||||||
|
use MauticPlugin\MT3SMarketingProgramBundle\Entity\Stakeholder;
|
||||||
|
use MauticPlugin\MT3SMarketingProgramBundle\Service\ItemTypeProvider;
|
||||||
use Symfony\Component\Form\AbstractType;
|
use Symfony\Component\Form\AbstractType;
|
||||||
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
|
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
|
||||||
use Symfony\Component\Form\Extension\Core\Type\EmailType;
|
use Symfony\Component\Form\Extension\Core\Type\EmailType;
|
||||||
@@ -18,8 +18,6 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* The create and edit form of a stakeholder of the global directory (Programs > Stakeholders).
|
* The create and edit form of a stakeholder of the global directory (Programs > Stakeholders).
|
||||||
*
|
|
||||||
* @extends AbstractType<Stakeholder>
|
|
||||||
*/
|
*/
|
||||||
class StakeholderType extends AbstractType
|
class StakeholderType extends AbstractType
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -20,8 +20,6 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
|
|||||||
* One row of the dependencies collection in TaskType: the task this one depends on, and the type of
|
* One row of the dependencies collection in TaskType: the task this one depends on, and the type of
|
||||||
* the relation. Only the tasks of the same program are offered; cycles and self-edges are refused by
|
* the relation. Only the tasks of the same program are offered; cycles and self-edges are refused by
|
||||||
* ValidTaskDependency.
|
* ValidTaskDependency.
|
||||||
*
|
|
||||||
* @extends AbstractType<TaskDependency>
|
|
||||||
*/
|
*/
|
||||||
class TaskDependencyType extends AbstractType
|
class TaskDependencyType extends AbstractType
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -19,8 +19,6 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
|
|||||||
/**
|
/**
|
||||||
* One row of the RACI collection in TaskType: a role (R/A/C/I) and the stakeholders carrying it.
|
* One row of the RACI collection in TaskType: a role (R/A/C/I) and the stakeholders carrying it.
|
||||||
* The stakeholders are picked from the program's assigned stakeholders; several may share a role.
|
* The stakeholders are picked from the program's assigned stakeholders; several may share a role.
|
||||||
*
|
|
||||||
* @extends AbstractType<TaskRaci>
|
|
||||||
*/
|
*/
|
||||||
class TaskRaciType extends AbstractType
|
class TaskRaciType extends AbstractType
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -30,8 +30,6 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
|
|||||||
* Kind rules: a milestone's end date is enslaved to its start date (the entity's setTaskKind copies
|
* Kind rules: a milestone's end date is enslaved to its start date (the entity's setTaskKind copies
|
||||||
* the start onto the end, and the TaskDates validator keeps it in step); a phase has no status
|
* the start onto the end, and the TaskDates validator keeps it in step); a phase has no status
|
||||||
* field — its state comes from its tasks.
|
* field — its state comes from its tasks.
|
||||||
*
|
|
||||||
* @extends AbstractType<Task>
|
|
||||||
*/
|
*/
|
||||||
class TaskType extends AbstractType
|
class TaskType extends AbstractType
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -29,8 +29,6 @@ use Symfony\Contracts\Translation\TranslatorInterface;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* One parameter row: a catalog entry (option `definition`) or a custom parameter (`definition` = null).
|
* One parameter row: a catalog entry (option `definition`) or a custom parameter (`definition` = null).
|
||||||
*
|
|
||||||
* @extends AbstractType<array<string, mixed>>
|
|
||||||
*/
|
*/
|
||||||
final class UtmParameterType extends AbstractType
|
final class UtmParameterType extends AbstractType
|
||||||
{
|
{
|
||||||
@@ -48,9 +46,9 @@ final class UtmParameterType extends AbstractType
|
|||||||
public static function labelConstraints(): array
|
public static function labelConstraints(): array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
new NotBlank(message: 'mautic.smartlinks.config.error.label_required'),
|
new NotBlank(message: 'mt3s.smart_links.config.error.label_required'),
|
||||||
new Length(max: UtmSettingsValidator::MAX_LENGTH, maxMessage: 'mautic.smartlinks.config.error.label_length'),
|
new Length(max: UtmSettingsValidator::MAX_LENGTH, maxMessage: 'mt3s.smart_links.config.error.label_length'),
|
||||||
new Regex(pattern: '/%/', match: false, message: 'mautic.smartlinks.config.error.label_invalid'),
|
new Regex(pattern: '/%/', match: false, message: 'mt3s.smart_links.config.error.label_invalid'),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -62,44 +60,44 @@ final class UtmParameterType extends AbstractType
|
|||||||
|
|
||||||
if (null === $definition) {
|
if (null === $definition) {
|
||||||
$builder->add('key', TextType::class, [
|
$builder->add('key', TextType::class, [
|
||||||
'label' => 'mautic.smartlinks.config.parameter.key',
|
'label' => 'mt3s.smart_links.config.parameter.key',
|
||||||
'attr' => [
|
'attr' => [
|
||||||
'class' => 'form-control utm-custom-key',
|
'class' => 'form-control utm-custom-key',
|
||||||
'tooltip' => 'mautic.smartlinks.config.parameter.key.tooltip',
|
'tooltip' => 'mt3s.smart_links.config.parameter.key.tooltip',
|
||||||
'maxlength' => 41,
|
'maxlength' => 41,
|
||||||
],
|
],
|
||||||
'constraints' => [
|
'constraints' => [
|
||||||
new NotBlank(message: 'mautic.smartlinks.config.error.key_required'),
|
new NotBlank(message: 'mt3s.smart_links.config.error.key_required'),
|
||||||
new Callback(callback: $this->validateCustomKey(...)),
|
new Callback(callback: $this->validateCustomKey(...)),
|
||||||
],
|
],
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
$builder->add('enabled', YesNoButtonGroupType::class, [
|
$builder->add('enabled', YesNoButtonGroupType::class, [
|
||||||
'label' => 'mautic.smartlinks.config.parameter.enabled',
|
'label' => 'mt3s.smart_links.config.parameter.enabled',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$builder->add('label', TextType::class, [
|
$builder->add('label', TextType::class, [
|
||||||
'label' => 'mautic.smartlinks.config.parameter.label',
|
'label' => 'mt3s.smart_links.config.parameter.label',
|
||||||
'attr' => ['class' => 'form-control', 'maxlength' => UtmSettingsValidator::MAX_LENGTH],
|
'attr' => ['class' => 'form-control', 'maxlength' => UtmSettingsValidator::MAX_LENGTH],
|
||||||
'constraints' => self::labelConstraints(),
|
'constraints' => self::labelConstraints(),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$modeAttr = ['class' => 'form-control utm-mode'];
|
$modeAttr = ['class' => 'form-control utm-mode'];
|
||||||
if ($definition?->autoGenerated) {
|
if ($definition?->autoGenerated) {
|
||||||
$modeAttr['tooltip'] = 'mautic.smartlinks.config.auto_generated.tooltip';
|
$modeAttr['tooltip'] = 'mt3s.smart_links.config.auto_generated.tooltip';
|
||||||
}
|
}
|
||||||
|
|
||||||
$builder->add('mode', ChoiceType::class, [
|
$builder->add('mode', ChoiceType::class, [
|
||||||
'label' => 'mautic.smartlinks.config.parameter.mode',
|
'label' => 'mt3s.smart_links.config.parameter.mode',
|
||||||
'choices' => array_combine(
|
'choices' => array_combine(
|
||||||
array_map(fn (string $mode): string => 'mautic.smartlinks.config.mode.'.$mode, $allowedModes),
|
array_map(fn (string $mode): string => 'mt3s.smart_links.config.mode.'.$mode, $allowedModes),
|
||||||
$allowedModes
|
$allowedModes
|
||||||
),
|
),
|
||||||
'placeholder' => false,
|
'placeholder' => false,
|
||||||
'attr' => $modeAttr,
|
'attr' => $modeAttr,
|
||||||
'invalid_message' => 'mautic.smartlinks.config.error.mode_invalid',
|
'invalid_message' => 'mt3s.smart_links.config.error.mode_invalid',
|
||||||
'constraints' => [new NotBlank(message: 'mautic.smartlinks.config.error.mode_invalid')],
|
'constraints' => [new NotBlank(message: 'mt3s.smart_links.config.error.mode_invalid')],
|
||||||
]);
|
]);
|
||||||
|
|
||||||
// Values only exist in dropdown mode: drop anything submitted for other modes (or for parameters
|
// Values only exist in dropdown mode: drop anything submitted for other modes (or for parameters
|
||||||
@@ -137,15 +135,15 @@ final class UtmParameterType extends AbstractType
|
|||||||
|
|
||||||
$view->vars['utm_custom'] = null === $definition;
|
$view->vars['utm_custom'] = null === $definition;
|
||||||
$view->vars['utm_key'] = $definition?->key;
|
$view->vars['utm_key'] = $definition?->key;
|
||||||
$view->vars['utm_group'] = $definition?->group ?? UtmParameterCatalog::GROUP_CUSTOM;
|
$view->vars['utm_group'] = $definition->group ?? UtmParameterCatalog::GROUP_CUSTOM;
|
||||||
$view->vars['utm_description_key'] = $definition?->getDescriptionKey();
|
$view->vars['utm_description_key'] = $definition?->getDescriptionKey();
|
||||||
$view->vars['utm_auto_generated'] = $definition?->autoGenerated ?? false;
|
$view->vars['utm_auto_generated'] = $definition->autoGenerated ?? false;
|
||||||
$view->vars['utm_suggestions'] = array_map(
|
$view->vars['utm_suggestions'] = array_map(
|
||||||
fn (string $value): array => [
|
fn (string $value): array => [
|
||||||
'value' => $value,
|
'value' => $value,
|
||||||
'label' => $this->translator->trans(UtmParameterDefinition::getSuggestionLabelKey($value)),
|
'label' => $this->translator->trans(UtmParameterDefinition::getSuggestionLabelKey($value)),
|
||||||
],
|
],
|
||||||
$definition?->suggestions ?? []
|
$definition->suggestions ?? []
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ namespace MauticPlugin\MT3SMarketingProgramBundle\Form\Type;
|
|||||||
use Mautic\CoreBundle\Form\Type\FormButtonsType;
|
use Mautic\CoreBundle\Form\Type\FormButtonsType;
|
||||||
use MauticPlugin\MT3SMarketingProgramBundle\Catalog\UtmParameterMode;
|
use MauticPlugin\MT3SMarketingProgramBundle\Catalog\UtmParameterMode;
|
||||||
use MauticPlugin\MT3SMarketingProgramBundle\Entity\UtmTaxonomy;
|
use MauticPlugin\MT3SMarketingProgramBundle\Entity\UtmTaxonomy;
|
||||||
use MauticPlugin\MT3SMarketingProgramBundle\Form\Validator\UtmSettingsValidator;
|
|
||||||
use MauticPlugin\MT3SMarketingProgramBundle\Form\Validator\UtmTaxonomyValidator;
|
use MauticPlugin\MT3SMarketingProgramBundle\Form\Validator\UtmTaxonomyValidator;
|
||||||
use MauticPlugin\MT3SMarketingProgramBundle\Service\UtmConfigurationProvider;
|
use MauticPlugin\MT3SMarketingProgramBundle\Service\UtmConfigurationProvider;
|
||||||
use Symfony\Component\Form\AbstractType;
|
use Symfony\Component\Form\AbstractType;
|
||||||
@@ -35,8 +34,6 @@ use Symfony\Component\Validator\Context\ExecutionContextInterface;
|
|||||||
* selection -- nothing can be typed), and a `free` parameter gets its own editable value
|
* selection -- nothing can be typed), and a `free` parameter gets its own editable value
|
||||||
* list here (one `value` or `value;Label` per line): a Smart Link using this taxonomy picks
|
* list here (one `value` or `value;Label` per line): a Smart Link using this taxonomy picks
|
||||||
* a value from it instead of typing freely.
|
* a value from it instead of typing freely.
|
||||||
*
|
|
||||||
* @extends AbstractType<UtmTaxonomy>
|
|
||||||
*/
|
*/
|
||||||
final class UtmTaxonomyType extends AbstractType
|
final class UtmTaxonomyType extends AbstractType
|
||||||
{
|
{
|
||||||
@@ -49,26 +46,26 @@ final class UtmTaxonomyType extends AbstractType
|
|||||||
public function buildForm(FormBuilderInterface $builder, array $options): void
|
public function buildForm(FormBuilderInterface $builder, array $options): void
|
||||||
{
|
{
|
||||||
$builder->add('name', TextType::class, [
|
$builder->add('name', TextType::class, [
|
||||||
'label' => 'mautic.smartlinks.taxonomies.name',
|
'label' => 'mt3s.smart_links.taxonomies.name',
|
||||||
'required' => true,
|
'required' => true,
|
||||||
'attr' => [
|
'attr' => [
|
||||||
'class' => 'form-control',
|
'class' => 'form-control',
|
||||||
'maxlength' => UtmTaxonomy::NAME_MAX_LENGTH,
|
'maxlength' => UtmTaxonomy::NAME_MAX_LENGTH,
|
||||||
'tooltip' => 'mautic.smartlinks.taxonomies.name.tooltip',
|
'tooltip' => 'mt3s.smart_links.taxonomies.name.tooltip',
|
||||||
],
|
],
|
||||||
'constraints' => [
|
'constraints' => [
|
||||||
new NotBlank(message: 'mautic.smartlinks.taxonomies.error.name_required'),
|
new NotBlank(message: 'mt3s.smart_links.taxonomies.error.name_required'),
|
||||||
new Length(max: UtmTaxonomy::NAME_MAX_LENGTH, maxMessage: 'mautic.smartlinks.taxonomies.error.name_length'),
|
new Length(max: UtmTaxonomy::NAME_MAX_LENGTH, maxMessage: 'mt3s.smart_links.taxonomies.error.name_length'),
|
||||||
new Callback(callback: $this->validateName(...)),
|
new Callback(callback: $this->validateName(...)),
|
||||||
],
|
],
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$builder->add('description', TextareaType::class, [
|
$builder->add('description', TextareaType::class, [
|
||||||
'label' => 'mautic.smartlinks.taxonomies.description',
|
'label' => 'mt3s.smart_links.taxonomies.description',
|
||||||
'required' => false,
|
'required' => false,
|
||||||
'attr' => [
|
'attr' => [
|
||||||
'class' => 'form-control',
|
'class' => 'form-control',
|
||||||
'tooltip' => 'mautic.smartlinks.taxonomies.description.tooltip',
|
'tooltip' => 'mt3s.smart_links.taxonomies.description.tooltip',
|
||||||
'rows' => 3,
|
'rows' => 3,
|
||||||
],
|
],
|
||||||
]);
|
]);
|
||||||
@@ -114,7 +111,7 @@ final class UtmTaxonomyType extends AbstractType
|
|||||||
if (isset($dropdowns[$key])) {
|
if (isset($dropdowns[$key])) {
|
||||||
$attr = ['class' => 'utm-taxonomy-values'];
|
$attr = ['class' => 'utm-taxonomy-values'];
|
||||||
if ([] === $dropdowns[$key]) {
|
if ([] === $dropdowns[$key]) {
|
||||||
$attr['tooltip'] = 'mautic.smartlinks.taxonomies.no_values.tooltip';
|
$attr['tooltip'] = 'mt3s.smart_links.taxonomies.no_values.tooltip';
|
||||||
}
|
}
|
||||||
|
|
||||||
$builder->get('parameters')->add($key, ChoiceType::class, [
|
$builder->get('parameters')->add($key, ChoiceType::class, [
|
||||||
@@ -136,8 +133,8 @@ final class UtmTaxonomyType extends AbstractType
|
|||||||
'attr' => [
|
'attr' => [
|
||||||
'class' => 'form-control utm-taxonomy-free-values',
|
'class' => 'form-control utm-taxonomy-free-values',
|
||||||
'rows' => 2,
|
'rows' => 2,
|
||||||
'tooltip' => 'mautic.smartlinks.taxonomies.free_values.tooltip',
|
'tooltip' => 'mt3s.smart_links.taxonomies.free_values.tooltip',
|
||||||
'placeholder' => 'mautic.smartlinks.taxonomies.free_values.placeholder',
|
'placeholder' => 'mt3s.smart_links.taxonomies.free_values.placeholder',
|
||||||
],
|
],
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,39 +16,37 @@ use Symfony\Component\Validator\Constraints\Regex;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* One allowed value of a `dropdown` parameter.
|
* One allowed value of a `dropdown` parameter.
|
||||||
*
|
|
||||||
* @extends AbstractType<array<string, mixed>>
|
|
||||||
*/
|
*/
|
||||||
final class UtmValueType extends AbstractType
|
final class UtmValueType extends AbstractType
|
||||||
{
|
{
|
||||||
public function buildForm(FormBuilderInterface $builder, array $options): void
|
public function buildForm(FormBuilderInterface $builder, array $options): void
|
||||||
{
|
{
|
||||||
$builder->add('value', TextType::class, [
|
$builder->add('value', TextType::class, [
|
||||||
'label' => 'mautic.smartlinks.config.values.value',
|
'label' => 'mt3s.smart_links.config.values.value',
|
||||||
'attr' => [
|
'attr' => [
|
||||||
'class' => 'form-control utm-value-input',
|
'class' => 'form-control utm-value-input',
|
||||||
'placeholder' => 'mautic.smartlinks.config.values.value',
|
'placeholder' => 'mt3s.smart_links.config.values.value',
|
||||||
'maxlength' => UtmSettingsValidator::MAX_LENGTH,
|
'maxlength' => UtmSettingsValidator::MAX_LENGTH,
|
||||||
],
|
],
|
||||||
'constraints' => [
|
'constraints' => [
|
||||||
new NotBlank(message: 'mautic.smartlinks.config.error.value_required'),
|
new NotBlank(message: 'mt3s.smart_links.config.error.value_required'),
|
||||||
new Length(max: UtmSettingsValidator::MAX_LENGTH, maxMessage: 'mautic.smartlinks.config.error.value_length'),
|
new Length(max: UtmSettingsValidator::MAX_LENGTH, maxMessage: 'mt3s.smart_links.config.error.value_length'),
|
||||||
new Regex(pattern: UtmSettingsValidator::VALUE_PATTERN, message: 'mautic.smartlinks.config.error.value_invalid'),
|
new Regex(pattern: UtmSettingsValidator::VALUE_PATTERN, message: 'mt3s.smart_links.config.error.value_invalid'),
|
||||||
],
|
],
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$builder->add('label', TextType::class, [
|
$builder->add('label', TextType::class, [
|
||||||
'label' => 'mautic.smartlinks.config.values.label',
|
'label' => 'mt3s.smart_links.config.values.label',
|
||||||
'attr' => [
|
'attr' => [
|
||||||
'class' => 'form-control utm-label-input',
|
'class' => 'form-control utm-label-input',
|
||||||
'placeholder' => 'mautic.smartlinks.config.values.label',
|
'placeholder' => 'mt3s.smart_links.config.values.label',
|
||||||
'maxlength' => UtmSettingsValidator::MAX_LENGTH,
|
'maxlength' => UtmSettingsValidator::MAX_LENGTH,
|
||||||
],
|
],
|
||||||
'constraints' => UtmParameterType::labelConstraints(),
|
'constraints' => UtmParameterType::labelConstraints(),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$builder->add('is_default', CheckboxType::class, [
|
$builder->add('is_default', CheckboxType::class, [
|
||||||
'label' => 'mautic.smartlinks.config.values.default',
|
'label' => 'mt3s.smart_links.config.values.default',
|
||||||
'required' => false,
|
'required' => false,
|
||||||
'attr' => ['class' => 'utm-value-default'],
|
'attr' => ['class' => 'utm-value-default'],
|
||||||
]);
|
]);
|
||||||
|
|||||||
@@ -144,11 +144,11 @@ final class UtmFieldsApplicator
|
|||||||
$storedValue = null === $stored ? '' : (string) $stored;
|
$storedValue = null === $stored ? '' : (string) $stored;
|
||||||
if ('' !== $storedValue && !array_key_exists($storedValue, $labels)) {
|
if ('' !== $storedValue && !array_key_exists($storedValue, $labels)) {
|
||||||
// Legacy value: kept as the last choice so it displays and re-saves without data loss.
|
// Legacy value: kept as the last choice so it displays and re-saves without data loss.
|
||||||
$labels[$storedValue] = $this->translator->trans('mautic.smartlinks.form.legacy_choice', ['%value%' => $storedValue]);
|
$labels[$storedValue] = $this->translator->trans('mt3s.smart_links.form.legacy_choice', ['%value%' => $storedValue]);
|
||||||
$options['help'] = 'mautic.smartlinks.form.legacy_warning';
|
$options['help'] = 'mt3s.smart_links.form.legacy_warning';
|
||||||
$options['help_attr'] = ['class' => 'text-warning'];
|
$options['help_attr'] = ['class' => 'text-warning'];
|
||||||
} elseif ([] === $labels) {
|
} elseif ([] === $labels) {
|
||||||
$options['help'] = 'mautic.smartlinks.form.no_values';
|
$options['help'] = 'mt3s.smart_links.form.no_values';
|
||||||
$options['help_attr'] = ['class' => 'text-warning'];
|
$options['help_attr'] = ['class' => 'text-warning'];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -157,12 +157,12 @@ final class UtmFieldsApplicator
|
|||||||
'choice_label' => static fn (string $value): string => $labels[$value],
|
'choice_label' => static fn (string $value): string => $labels[$value],
|
||||||
// Configured labels are shown as typed. The placeholder is translated here for the same reason.
|
// Configured labels are shown as typed. The placeholder is translated here for the same reason.
|
||||||
'choice_translation_domain' => false,
|
'choice_translation_domain' => false,
|
||||||
'placeholder' => $this->translator->trans('mautic.smartlinks.form.choose'),
|
'placeholder' => $this->translator->trans('mt3s.smart_links.form.choose'),
|
||||||
'required' => false,
|
'required' => false,
|
||||||
'multiple' => false,
|
'multiple' => false,
|
||||||
'expanded' => false,
|
'expanded' => false,
|
||||||
'attr' => ['class' => 'form-control'],
|
'attr' => ['class' => 'form-control'],
|
||||||
'invalid_message' => 'mautic.smartlinks.form.error.not_in_taxonomy',
|
'invalid_message' => 'mt3s.smart_links.form.error.not_in_taxonomy',
|
||||||
];
|
];
|
||||||
|
|
||||||
if (null !== $label) {
|
if (null !== $label) {
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ use Mautic\PageBundle\Entity\Page;
|
|||||||
use MauticPlugin\MT3SMarketingProgramBundle\Catalog\SmartLinkRedirectType;
|
use MauticPlugin\MT3SMarketingProgramBundle\Catalog\SmartLinkRedirectType;
|
||||||
use MauticPlugin\MT3SMarketingProgramBundle\Catalog\UtmParameterMode;
|
use MauticPlugin\MT3SMarketingProgramBundle\Catalog\UtmParameterMode;
|
||||||
use MauticPlugin\MT3SMarketingProgramBundle\Entity\UtmTaxonomy;
|
use MauticPlugin\MT3SMarketingProgramBundle\Entity\UtmTaxonomy;
|
||||||
use MauticPlugin\MT3SMarketingProgramBundle\Service\UtmConfigurationProvider;
|
|
||||||
use MauticPlugin\MT3SMarketingProgramBundle\Model\SmartLinkModel;
|
use MauticPlugin\MT3SMarketingProgramBundle\Model\SmartLinkModel;
|
||||||
|
use MauticPlugin\MT3SMarketingProgramBundle\Service\UtmConfigurationProvider;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Business rules of the Smart Link form. The form type calls these methods from Callback
|
* Business rules of the Smart Link form. The form type calls these methods from Callback
|
||||||
@@ -18,15 +18,15 @@ use MauticPlugin\MT3SMarketingProgramBundle\Model\SmartLinkModel;
|
|||||||
*/
|
*/
|
||||||
final class SmartLinkValidator
|
final class SmartLinkValidator
|
||||||
{
|
{
|
||||||
public const ERROR_SLUG_TAKEN = 'mautic.smartlinks.smart_links.error.slug_taken';
|
public const ERROR_SLUG_TAKEN = 'mt3s.smart_links.smart_links.error.slug_taken';
|
||||||
public const ERROR_SLUG_REQUIRED = 'mautic.smartlinks.smart_links.error.slug_required';
|
public const ERROR_SLUG_REQUIRED = 'mt3s.smart_links.smart_links.error.slug_required';
|
||||||
public const ERROR_SLUG_LENGTH = 'mautic.smartlinks.smart_links.error.slug_length';
|
public const ERROR_SLUG_LENGTH = 'mt3s.smart_links.smart_links.error.slug_length';
|
||||||
public const ERROR_DESTINATION_REQUIRED = 'mautic.smartlinks.smart_links.error.destination_required';
|
public const ERROR_DESTINATION_REQUIRED = 'mt3s.smart_links.smart_links.error.destination_required';
|
||||||
public const ERROR_DESTINATION_REQUIRED_MAUTIC = 'mautic.smartlinks.smart_links.error.destination_required_mautic';
|
public const ERROR_DESTINATION_REQUIRED_MAUTIC = 'mt3s.smart_links.smart_links.error.destination_required_mautic';
|
||||||
public const ERROR_DESTINATION_INVALID = 'mautic.smartlinks.smart_links.error.destination_invalid';
|
public const ERROR_DESTINATION_INVALID = 'mt3s.smart_links.smart_links.error.destination_invalid';
|
||||||
public const ERROR_UTM_VALUE_INVALID = 'mautic.smartlinks.smart_links.error.utm_value_invalid';
|
public const ERROR_UTM_VALUE_INVALID = 'mt3s.smart_links.smart_links.error.utm_value_invalid';
|
||||||
public const ERROR_UTM_VALUE_NOT_ALLOWED = 'mautic.smartlinks.smart_links.error.utm_value_not_allowed';
|
public const ERROR_UTM_VALUE_NOT_ALLOWED = 'mt3s.smart_links.smart_links.error.utm_value_not_allowed';
|
||||||
public const ERROR_TAXONOMY_PARAMETER_UNKNOWN = 'mautic.smartlinks.smart_links.error.taxonomy_parameter_unknown';
|
public const ERROR_TAXONOMY_PARAMETER_UNKNOWN = 'mt3s.smart_links.smart_links.error.taxonomy_parameter_unknown';
|
||||||
|
|
||||||
public function __construct(
|
public function __construct(
|
||||||
private readonly SmartLinkModel $smartLinkModel,
|
private readonly SmartLinkModel $smartLinkModel,
|
||||||
|
|||||||
@@ -18,12 +18,12 @@ final class UtmSettingsValidator
|
|||||||
|
|
||||||
public const MAX_LENGTH = 100;
|
public const MAX_LENGTH = 100;
|
||||||
|
|
||||||
public const ERROR_KEY_INVALID = 'mautic.smartlinks.config.error.key_invalid';
|
public const ERROR_KEY_INVALID = 'mt3s.smart_links.config.error.key_invalid';
|
||||||
public const ERROR_KEY_RESERVED = 'mautic.smartlinks.config.error.key_reserved';
|
public const ERROR_KEY_RESERVED = 'mt3s.smart_links.config.error.key_reserved';
|
||||||
public const ERROR_KEY_DUPLICATE = 'mautic.smartlinks.config.error.key_duplicate';
|
public const ERROR_KEY_DUPLICATE = 'mt3s.smart_links.config.error.key_duplicate';
|
||||||
public const ERROR_VALUES_REQUIRED = 'mautic.smartlinks.config.error.values_required';
|
public const ERROR_VALUES_REQUIRED = 'mt3s.smart_links.config.error.values_required';
|
||||||
public const ERROR_VALUE_DUPLICATE = 'mautic.smartlinks.config.error.value_duplicate';
|
public const ERROR_VALUE_DUPLICATE = 'mt3s.smart_links.config.error.value_duplicate';
|
||||||
public const ERROR_DEFAULT_MULTIPLE = 'mautic.smartlinks.config.error.default_multiple';
|
public const ERROR_DEFAULT_MULTIPLE = 'mt3s.smart_links.config.error.default_multiple';
|
||||||
|
|
||||||
public function __construct(
|
public function __construct(
|
||||||
private readonly UtmParameterCatalog $catalog,
|
private readonly UtmParameterCatalog $catalog,
|
||||||
|
|||||||
@@ -12,10 +12,10 @@ use MauticPlugin\MT3SMarketingProgramBundle\Model\UtmTaxonomyModel;
|
|||||||
*/
|
*/
|
||||||
final class UtmTaxonomyValidator
|
final class UtmTaxonomyValidator
|
||||||
{
|
{
|
||||||
public const ERROR_NAME_TAKEN = 'mautic.smartlinks.taxonomies.error.name_taken';
|
public const ERROR_NAME_TAKEN = 'mt3s.smart_links.taxonomies.error.name_taken';
|
||||||
public const ERROR_NAME_CHARACTERS = 'mautic.smartlinks.taxonomies.error.name_characters';
|
public const ERROR_NAME_CHARACTERS = 'mt3s.smart_links.taxonomies.error.name_characters';
|
||||||
public const ERROR_VALUE_INVALID = 'mautic.smartlinks.taxonomies.error.value_invalid';
|
public const ERROR_VALUE_INVALID = 'mt3s.smart_links.taxonomies.error.value_invalid';
|
||||||
public const ERROR_VALUE_DUPLICATE = 'mautic.smartlinks.config.error.value_duplicate';
|
public const ERROR_VALUE_DUPLICATE = 'mt3s.smart_links.config.error.value_duplicate';
|
||||||
|
|
||||||
public function __construct(
|
public function __construct(
|
||||||
private readonly UtmTaxonomyModel $taxonomyModel,
|
private readonly UtmTaxonomyModel $taxonomyModel,
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ class MT3SMarketingProgramIntegration extends BasicIntegration implements BasicI
|
|||||||
use ConfigurationTrait;
|
use ConfigurationTrait;
|
||||||
|
|
||||||
public const NAME = 'MT3SMarketingProgram';
|
public const NAME = 'MT3SMarketingProgram';
|
||||||
public const DISPLAY_NAME = 'Marketing Programs';
|
public const DISPLAY_NAME = 'MT3S Marketing Program';
|
||||||
|
|
||||||
public function getName(): string
|
public function getName(): string
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ class SmartlinksIntegration extends BasicIntegration implements BasicInterface
|
|||||||
use ConfigurationTrait;
|
use ConfigurationTrait;
|
||||||
|
|
||||||
public const NAME = 'Smartlinks';
|
public const NAME = 'Smartlinks';
|
||||||
public const DISPLAY_NAME = 'Smartlinks';
|
public const DISPLAY_NAME = 'Smart Links';
|
||||||
|
|
||||||
public function getName(): string
|
public function getName(): string
|
||||||
{
|
{
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@ use Mautic\IntegrationsBundle\Integration\DefaultConfigFormTrait;
|
|||||||
use Mautic\IntegrationsBundle\Integration\Interfaces\ConfigFormInterface;
|
use Mautic\IntegrationsBundle\Integration\Interfaces\ConfigFormInterface;
|
||||||
use MauticPlugin\MT3SMarketingProgramBundle\Integration\SmartlinksIntegration;
|
use MauticPlugin\MT3SMarketingProgramBundle\Integration\SmartlinksIntegration;
|
||||||
|
|
||||||
class ConfigSupport extends SmartlinksIntegration implements ConfigFormInterface
|
class SmartlinksConfigSupport extends SmartlinksIntegration implements ConfigFormInterface
|
||||||
{
|
{
|
||||||
use DefaultConfigFormTrait;
|
use DefaultConfigFormTrait;
|
||||||
}
|
}
|
||||||
@@ -6,6 +6,7 @@ namespace MauticPlugin\MT3SMarketingProgramBundle\Migrations;
|
|||||||
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
use Mautic\IntegrationsBundle\Migration\AbstractMigration;
|
use Mautic\IntegrationsBundle\Migration\AbstractMigration;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Since 0.10.0 objectives have a type, the key of an objective type set up in Settings >
|
* Since 0.10.0 objectives have a type, the key of an objective type set up in Settings >
|
||||||
* Configuration > Plan Settings (parameter plan_objective_types). Adds initiative_objectives.type for
|
* Configuration > Plan Settings (parameter plan_objective_types). Adds initiative_objectives.type for
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ namespace MauticPlugin\MT3SMarketingProgramBundle\Migrations;
|
|||||||
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
use Mautic\IntegrationsBundle\Migration\AbstractMigration;
|
use Mautic\IntegrationsBundle\Migration\AbstractMigration;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Since 0.10.1 objectives have a priority, a whole number from 1 (highest) to 99 (lowest). Adds
|
* Since 0.10.1 objectives have a priority, a whole number from 1 (highest) to 99 (lowest). Adds
|
||||||
* initiative_objectives.priority for installs created before 0.10.1: NOT NULL with the default 1, and the
|
* initiative_objectives.priority for installs created before 0.10.1: NOT NULL with the default 1, and the
|
||||||
@@ -29,7 +30,7 @@ class Version_0_10_1 extends AbstractMigration
|
|||||||
|
|
||||||
if (!$table->hasColumn('priority')) {
|
if (!$table->hasColumn('priority')) {
|
||||||
$this->addSql(sprintf(
|
$this->addSql(sprintf(
|
||||||
"ALTER TABLE %s ADD priority INT NOT NULL DEFAULT %d",
|
'ALTER TABLE %s ADD priority INT NOT NULL DEFAULT %d',
|
||||||
$objectives,
|
$objectives,
|
||||||
1
|
1
|
||||||
));
|
));
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ use Doctrine\ORM\Tools\SchemaTool;
|
|||||||
use Mautic\IntegrationsBundle\Migration\AbstractMigration;
|
use Mautic\IntegrationsBundle\Migration\AbstractMigration;
|
||||||
use MauticPlugin\MT3SMarketingProgramBundle\Entity\Audience;
|
use MauticPlugin\MT3SMarketingProgramBundle\Entity\Audience;
|
||||||
use MauticPlugin\MT3SMarketingProgramBundle\Entity\AudienceType as AudienceTypeEnum;
|
use MauticPlugin\MT3SMarketingProgramBundle\Entity\AudienceType as AudienceTypeEnum;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Since 0.11.0 a plan has audiences (table initiative_audiences, initiative_audiences_stages before 0.15.0) with any
|
* Since 0.11.0 a plan has audiences (table initiative_audiences, initiative_audiences_stages before 0.15.0) with any
|
||||||
* number of Mautic stages (join table initiative_audiences_stages). Creates both tables for installs created
|
* number of Mautic stages (join table initiative_audiences_stages). Creates both tables for installs created
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ namespace MauticPlugin\MT3SMarketingProgramBundle\Migrations;
|
|||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
use Mautic\IntegrationsBundle\Migration\AbstractMigration;
|
use Mautic\IntegrationsBundle\Migration\AbstractMigration;
|
||||||
use MauticPlugin\MT3SMarketingProgramBundle\Entity\Audience;
|
use MauticPlugin\MT3SMarketingProgramBundle\Entity\Audience;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Since 0.14.0 audiences are a global directory (Planning > Audiences, called Targets before 0.15.0),
|
* Since 0.14.0 audiences are a global directory (Planning > Audiences, called Targets before 0.15.0),
|
||||||
* like stakeholders:
|
* like stakeholders:
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ namespace MauticPlugin\MT3SMarketingProgramBundle\Migrations;
|
|||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
use Mautic\IntegrationsBundle\Migration\AbstractMigration;
|
use Mautic\IntegrationsBundle\Migration\AbstractMigration;
|
||||||
use MauticPlugin\MT3SMarketingProgramBundle\Entity\Audience;
|
use MauticPlugin\MT3SMarketingProgramBundle\Entity\Audience;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Historical migration (from 0.15.0, when the bundle was still PlanBundle): it renamed "targets"
|
* Historical migration (from 0.15.0, when the bundle was still PlanBundle): it renamed "targets"
|
||||||
* to "audiences" — plan_targets became plan_audiences (its target_type column audience_type),
|
* to "audiences" — plan_targets became plan_audiences (its target_type column audience_type),
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ namespace MauticPlugin\MT3SMarketingProgramBundle\Migrations;
|
|||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
use Doctrine\DBAL\Schema\Table;
|
use Doctrine\DBAL\Schema\Table;
|
||||||
use Mautic\IntegrationsBundle\Migration\AbstractMigration;
|
use Mautic\IntegrationsBundle\Migration\AbstractMigration;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Brings the plans table in line with the entity mapping.
|
* Brings the plans table in line with the entity mapping.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ namespace MauticPlugin\MT3SMarketingProgramBundle\Migrations;
|
|||||||
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
use Mautic\IntegrationsBundle\Migration\AbstractMigration;
|
use Mautic\IntegrationsBundle\Migration\AbstractMigration;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds plans.version and the initiative_objectives table to installs created before 0.3.0.
|
* Adds plans.version and the initiative_objectives table to installs created before 0.3.0.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ class Version_0_4_0 extends AbstractMigration
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
throw new \RuntimeException('SchemaTool returned no CREATE TABLE statement for '.'initiative_tasks'.'.');
|
throw new \RuntimeException('SchemaTool returned no CREATE TABLE statement for initiative_tasks.');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ namespace MauticPlugin\MT3SMarketingProgramBundle\Migrations;
|
|||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
use Doctrine\ORM\Tools\SchemaTool;
|
use Doctrine\ORM\Tools\SchemaTool;
|
||||||
use Mautic\IntegrationsBundle\Migration\AbstractMigration;
|
use Mautic\IntegrationsBundle\Migration\AbstractMigration;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* For installs created before 0.6.0:
|
* For installs created before 0.6.0:
|
||||||
* - creates initiative_description_items (and its foreign key to plans, ON DELETE CASCADE);
|
* - creates initiative_description_items (and its foreign key to plans, ON DELETE CASCADE);
|
||||||
@@ -80,6 +81,6 @@ class Version_0_6_0 extends AbstractMigration
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
throw new \RuntimeException('SchemaTool returned no CREATE TABLE statement for '.'initiative_description_items'.'.');
|
throw new \RuntimeException('SchemaTool returned no CREATE TABLE statement for initiative_description_items.');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -7,6 +7,7 @@ namespace MauticPlugin\MT3SMarketingProgramBundle\Migrations;
|
|||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
use Doctrine\ORM\Tools\SchemaTool;
|
use Doctrine\ORM\Tools\SchemaTool;
|
||||||
use Mautic\IntegrationsBundle\Migration\AbstractMigration;
|
use Mautic\IntegrationsBundle\Migration\AbstractMigration;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates initiative_allocation_items (and its foreign key to plans, ON DELETE CASCADE) for installs created
|
* Creates initiative_allocation_items (and its foreign key to plans, ON DELETE CASCADE) for installs created
|
||||||
* before 0.7.0. Each step runs only if needed. As in Version_0_4_0, only the CREATE TABLE statement for
|
* before 0.7.0. Each step runs only if needed. As in Version_0_4_0, only the CREATE TABLE statement for
|
||||||
@@ -71,6 +72,6 @@ class Version_0_7_0 extends AbstractMigration
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
throw new \RuntimeException('SchemaTool returned no CREATE TABLE statement for '.'initiative_allocation_items'.'.');
|
throw new \RuntimeException('SchemaTool returned no CREATE TABLE statement for initiative_allocation_items.');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -6,6 +6,7 @@ namespace MauticPlugin\MT3SMarketingProgramBundle\Migrations;
|
|||||||
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
use Mautic\IntegrationsBundle\Migration\AbstractMigration;
|
use Mautic\IntegrationsBundle\Migration\AbstractMigration;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Since 0.8.0 every amount is in one general currency (Settings > Configuration > Plan Settings, parameter
|
* Since 0.8.0 every amount is in one general currency (Settings > Configuration > Plan Settings, parameter
|
||||||
* program_currency), so the per-record currency columns are dropped: plans.currency,
|
* program_currency), so the per-record currency columns are dropped: plans.currency,
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ use Symfony\Component\Form\FormInterface;
|
|||||||
use Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException;
|
use Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Available as mt3s.marketing_program.model.audience, or getModel('mt3smp.audience').
|
* Available as mautic.mt3smarketingprogram.model.audience, or getModel('mt3smarketingprogram.audience').
|
||||||
*
|
*
|
||||||
* Audiences are a global directory (Programs > Audiences), independent of plans; plans link to
|
* Audiences are a global directory (Programs > Audiences), independent of plans; plans link to
|
||||||
* them from their Audiences tab through ProgramAudience (which carries the audience's priority in
|
* them from their Audiences tab through ProgramAudience (which carries the audience's priority in
|
||||||
|
|||||||
@@ -15,6 +15,8 @@ use Symfony\Component\Form\FormInterface;
|
|||||||
use Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException;
|
use Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Available as mautic.mt3smarketingprogram.model.program, or getModel('mt3smarketingprogram.program').
|
||||||
|
*
|
||||||
* @extends FormModel<Program>
|
* @extends FormModel<Program>
|
||||||
*/
|
*/
|
||||||
class ProgramModel extends FormModel
|
class ProgramModel extends FormModel
|
||||||
|
|||||||
@@ -26,13 +26,13 @@ use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
|
|||||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Available as mautic.smartlinks.model.smart_link, or getModel('smartlinks.smart_link').
|
* Available as mautic.mt3smarketingprogram.model.smart_link, or getModel('mt3smarketingprogram.smart_link').
|
||||||
*
|
*
|
||||||
* @extends FormModel<SmartLink>
|
* @extends FormModel<SmartLink>
|
||||||
*/
|
*/
|
||||||
class SmartLinkModel extends FormModel
|
class SmartLinkModel extends FormModel
|
||||||
{
|
{
|
||||||
public const MODEL_NAME = 'smartlinks.smart_link';
|
public const MODEL_NAME = 'mt3smarketingprogram.smart_link';
|
||||||
|
|
||||||
/** Random slugs offered by the "Generate" button: 4 characters, letters and digits. */
|
/** Random slugs offered by the "Generate" button: 4 characters, letters and digits. */
|
||||||
public const GENERATED_SLUG_LENGTH = 4;
|
public const GENERATED_SLUG_LENGTH = 4;
|
||||||
@@ -129,7 +129,7 @@ class SmartLinkModel extends FormModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param array<string, string> $utmParameters
|
* @param array<string, string|null> $utmParameters values may be null (an empty form field); they are dropped
|
||||||
*
|
*
|
||||||
* @return array<string, string>
|
* @return array<string, string>
|
||||||
*/
|
*/
|
||||||
@@ -181,14 +181,21 @@ class SmartLinkModel extends FormModel
|
|||||||
{
|
{
|
||||||
$stored = $this->coreParametersHelper->get(\MauticPlugin\MT3SMarketingProgramBundle\Form\Type\SmartLinksConfigType::CONFIG_PARAMETER, []);
|
$stored = $this->coreParametersHelper->get(\MauticPlugin\MT3SMarketingProgramBundle\Form\Type\SmartLinksConfigType::CONFIG_PARAMETER, []);
|
||||||
|
|
||||||
// Upgrades from < 0.5.0 keep the domain in local.php under the legacy key; serve it until
|
// Upgrades keep the domain in local.php under a legacy key (the standalone
|
||||||
// the Configuration page is saved again (which writes the new key).
|
// SmartlinksBundle wrote `smartlinks_config`, the UtmManagerBundle before it
|
||||||
|
// `utm_manager_smart_links`); serve it until the Configuration page is saved again.
|
||||||
|
$legacyKeys = [
|
||||||
|
\MauticPlugin\MT3SMarketingProgramBundle\Form\Type\SmartLinksConfigType::LEGACY_SMARTLINKS_PARAMETER,
|
||||||
|
\MauticPlugin\MT3SMarketingProgramBundle\Form\Type\SmartLinksConfigType::LEGACY_CONFIG_PARAMETER,
|
||||||
|
];
|
||||||
|
foreach ($legacyKeys as $legacyKey) {
|
||||||
if (!is_array($stored) || '' === trim((string) ($stored['short_link_domain'] ?? ''))) {
|
if (!is_array($stored) || '' === trim((string) ($stored['short_link_domain'] ?? ''))) {
|
||||||
$legacy = $this->coreParametersHelper->get(\MauticPlugin\MT3SMarketingProgramBundle\Form\Type\SmartLinksConfigType::LEGACY_CONFIG_PARAMETER, []);
|
$legacy = $this->coreParametersHelper->get($legacyKey, []);
|
||||||
if (is_array($legacy) && '' !== trim((string) ($legacy['short_link_domain'] ?? ''))) {
|
if (is_array($legacy) && '' !== trim((string) ($legacy['short_link_domain'] ?? ''))) {
|
||||||
$stored = $legacy;
|
$stored = $legacy;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$domain = trim(is_array($stored) ? (string) ($stored['short_link_domain'] ?? '') : '');
|
$domain = trim(is_array($stored) ? (string) ($stored['short_link_domain'] ?? '') : '');
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ use Symfony\Component\Form\FormInterface;
|
|||||||
use Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException;
|
use Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Available as mt3s.marketing_program.model.stakeholder, or getModel('mt3smp.stakeholder').
|
* Available as mautic.mt3smarketingprogram.model.stakeholder, or getModel('mt3smarketingprogram.stakeholder').
|
||||||
*
|
*
|
||||||
* On save, the phone number is normalized to E.164 using the default region from Settings >
|
* On save, the phone number is normalized to E.164 using the default region from Settings >
|
||||||
* Configuration > Program Settings (parameter mt3s_marketing_program_stakeholder_phone_region, FR by default). A number that
|
* Configuration > Program Settings (parameter mt3s_marketing_program_stakeholder_phone_region, FR by default). A number that
|
||||||
|
|||||||
+1
-1
@@ -14,7 +14,7 @@ use Symfony\Component\Form\FormInterface;
|
|||||||
use Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException;
|
use Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Available as mt3s.marketing_program.model.task, or getModel('mt3smp.task').
|
* Available as mautic.mt3smarketingprogram.model.task, or getModel('mt3smarketingprogram.task').
|
||||||
*
|
*
|
||||||
* @extends FormModel<Task>
|
* @extends FormModel<Task>
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -21,13 +21,13 @@ use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
|
|||||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Available as mautic.smartlinks.model.utm_taxonomy, or getModel('smartlinks.utm_taxonomy').
|
* Available as mautic.mt3smarketingprogram.model.utm_taxonomy, or getModel('mt3smarketingprogram.utm_taxonomy').
|
||||||
*
|
*
|
||||||
* @extends FormModel<UtmTaxonomy>
|
* @extends FormModel<UtmTaxonomy>
|
||||||
*/
|
*/
|
||||||
class UtmTaxonomyModel extends FormModel
|
class UtmTaxonomyModel extends FormModel
|
||||||
{
|
{
|
||||||
public const MODEL_NAME = 'smartlinks.utm_taxonomy';
|
public const MODEL_NAME = 'mt3smarketingprogram.utm_taxonomy';
|
||||||
|
|
||||||
public function __construct(
|
public function __construct(
|
||||||
EntityManagerInterface $em,
|
EntityManagerInterface $em,
|
||||||
|
|||||||
@@ -1,16 +1,16 @@
|
|||||||
{# Settings > Configuration > Smart Links Settings: the single tab of the plugin. Section "UTM
|
{# Settings > Configuration > Smart Links Settings: the single tab of the plugin. Section "UTM
|
||||||
Settings": the general rules and the short link domain. Section "Parameters": the catalog and
|
Settings": the general rules and the short link domain. Section "Parameters": the catalog and
|
||||||
custom parameters. Behaviour (rows, import, suggestions) lives in Assets/js/smartlinks.js. #}
|
custom parameters. Behaviour (rows, import, suggestions) lives in Assets/js/mt3s-mp-smartlinks.js. #}
|
||||||
|
|
||||||
{% block _config_smartlinksconfig_widget %}
|
{% block _config_smartlinksconfig_widget %}
|
||||||
{% set utm = form.children.smartlinks_utm_config %}
|
{% set utm = form.children.mt3s_smart_links_utm_config %}
|
||||||
{% set links = form.children.smartlinks_config %}
|
{% set links = form.children.mt3s_smart_links_config %}
|
||||||
<div class="text-muted small pb-md">{{ 'mautic.smartlinks.settings.description'|trans }}</div>
|
<div class="text-muted small pb-md">{{ 'mt3s.smart_links.settings.description'|trans }}</div>
|
||||||
{{ form_errors(utm) }}
|
{{ form_errors(utm) }}
|
||||||
{{ form_errors(links) }}
|
{{ form_errors(links) }}
|
||||||
|
|
||||||
<div class="smartlinks-utm-config">
|
<div class="smartlinks-utm-config">
|
||||||
<h4 class="fw-sb mb-xs">{{ 'mautic.smartlinks.config.section.utm_settings'|trans }}</h4>
|
<h4 class="fw-sb mb-xs">{{ 'mt3s.smart_links.config.section.utm_settings'|trans }}</h4>
|
||||||
<div class="panel panel-default mb-md">
|
<div class="panel panel-default mb-md">
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -21,11 +21,11 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h4 class="fw-sb mt-lg mb-xs">{{ 'mautic.smartlinks.config.section.parameters'|trans }}</h4>
|
<h4 class="fw-sb mt-lg mb-xs">{{ 'mt3s.smart_links.config.section.parameters'|trans }}</h4>
|
||||||
<p class="text-muted small">{{ 'mautic.smartlinks.config.description'|trans }}</p>
|
<p class="text-muted small">{{ 'mt3s.smart_links.config.description'|trans }}</p>
|
||||||
|
|
||||||
{% for group in ['standard', 'platform'] %}
|
{% for group in ['standard', 'platform'] %}
|
||||||
<h5 class="fw-sb mt-md mb-sm">{{ ('mautic.smartlinks.config.group.' ~ group)|trans }}</h5>
|
<h5 class="fw-sb mt-md mb-sm">{{ ('mt3s.smart_links.config.group.' ~ group)|trans }}</h5>
|
||||||
<div class="panel-group mb-md">
|
<div class="panel-group mb-md">
|
||||||
{% for parameter in utm.children.parameters|filter(p => p.vars.utm_group == group) %}
|
{% for parameter in utm.children.parameters|filter(p => p.vars.utm_group == group) %}
|
||||||
{{ form_widget(parameter) }}
|
{{ form_widget(parameter) }}
|
||||||
@@ -34,7 +34,7 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
{% set custom = utm.children.custom_parameters %}
|
{% set custom = utm.children.custom_parameters %}
|
||||||
<h5 class="fw-sb mt-md mb-sm">{{ 'mautic.smartlinks.config.group.custom'|trans }}</h5>
|
<h5 class="fw-sb mt-md mb-sm">{{ 'mt3s.smart_links.config.group.custom'|trans }}</h5>
|
||||||
{{ form_errors(custom) }}
|
{{ form_errors(custom) }}
|
||||||
<div class="panel-group mb-sm utm-custom-parameters"
|
<div class="panel-group mb-sm utm-custom-parameters"
|
||||||
data-prototype="{{ form_widget(custom.vars.prototype)|e('html_attr') }}"
|
data-prototype="{{ form_widget(custom.vars.prototype)|e('html_attr') }}"
|
||||||
@@ -43,9 +43,9 @@
|
|||||||
{{ form_widget(parameter) }}
|
{{ form_widget(parameter) }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
<p class="text-muted small utm-custom-empty{{ custom|length > 0 ? ' hide' : '' }}">{{ 'mautic.smartlinks.config.custom.empty'|trans }}</p>
|
<p class="text-muted small utm-custom-empty{{ custom|length > 0 ? ' hide' : '' }}">{{ 'mt3s.smart_links.config.custom.empty'|trans }}</p>
|
||||||
<button type="button" class="btn btn-default" data-utm-add-parameter>
|
<button type="button" class="btn btn-default" data-utm-add-parameter>
|
||||||
<i class="ri-add-line"></i> {{ 'mautic.smartlinks.config.custom.add'|trans }}
|
<i class="ri-add-line"></i> {{ 'mt3s.smart_links.config.custom.add'|trans }}
|
||||||
</button>
|
</button>
|
||||||
{% do custom.setRendered() %}
|
{% do custom.setRendered() %}
|
||||||
</div>
|
</div>
|
||||||
@@ -61,10 +61,10 @@
|
|||||||
<div class="panel panel-default mb-xs utm-parameter" data-utm-parameter>
|
<div class="panel panel-default mb-xs utm-parameter" data-utm-parameter>
|
||||||
<div class="panel-heading">
|
<div class="panel-heading">
|
||||||
<a class="panel-title d-flex" role="button" data-toggle="collapse" href="#{{ bodyId }}" aria-controls="{{ bodyId }}">
|
<a class="panel-title d-flex" role="button" data-toggle="collapse" href="#{{ bodyId }}" aria-controls="{{ bodyId }}">
|
||||||
<code class="utm-parameter-key mr-sm">{{ keyText is not empty ? keyText : 'mautic.smartlinks.config.custom.new'|trans }}</code>
|
<code class="utm-parameter-key mr-sm">{{ keyText is not empty ? keyText : 'mt3s.smart_links.config.custom.new'|trans }}</code>
|
||||||
<span class="text-muted">{{ fields.label.vars.value }}</span>
|
<span class="text-muted">{{ fields.label.vars.value }}</span>
|
||||||
{% if form.vars.utm_auto_generated %}
|
{% if form.vars.utm_auto_generated %}
|
||||||
<span class="label label-default ml-sm" data-toggle="tooltip" title="{{ 'mautic.smartlinks.config.auto_generated.tooltip'|trans }}">{{ 'mautic.smartlinks.config.auto_generated.badge'|trans }}</span>
|
<span class="label label-default ml-sm" data-toggle="tooltip" title="{{ 'mt3s.smart_links.config.auto_generated.tooltip'|trans }}">{{ 'mt3s.smart_links.config.auto_generated.badge'|trans }}</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if hasErrors %}<i class="ri-alert-line text-danger ml-sm"></i>{% endif %}
|
{% if hasErrors %}<i class="ri-alert-line text-danger ml-sm"></i>{% endif %}
|
||||||
</a>
|
</a>
|
||||||
@@ -89,40 +89,40 @@
|
|||||||
{# Hidden unless mode = dropdown, by Mautic's form field state switcher (data-show-on). #}
|
{# Hidden unless mode = dropdown, by Mautic's form field state switcher (data-show-on). #}
|
||||||
<div class="col-xs-12 utm-values-editor" id="{{ form.vars.id }}_values_editor"
|
<div class="col-xs-12 utm-values-editor" id="{{ form.vars.id }}_values_editor"
|
||||||
data-show-on="{{ {(fields.mode.vars.id): 'dropdown'}|json_encode|e('html_attr') }}">
|
data-show-on="{{ {(fields.mode.vars.id): 'dropdown'}|json_encode|e('html_attr') }}">
|
||||||
<label class="control-label">{{ 'mautic.smartlinks.config.values'|trans }}</label>
|
<label class="control-label">{{ 'mt3s.smart_links.config.values'|trans }}</label>
|
||||||
{{ form_errors(values) }}
|
{{ form_errors(values) }}
|
||||||
<div class="row small text-muted mb-xs">
|
<div class="row small text-muted mb-xs">
|
||||||
<div class="col-xs-1"></div>
|
<div class="col-xs-1"></div>
|
||||||
<div class="col-xs-4">{{ 'mautic.smartlinks.config.values.value'|trans }}</div>
|
<div class="col-xs-4">{{ 'mt3s.smart_links.config.values.value'|trans }}</div>
|
||||||
<div class="col-xs-4">{{ 'mautic.smartlinks.config.values.label'|trans }}</div>
|
<div class="col-xs-4">{{ 'mt3s.smart_links.config.values.label'|trans }}</div>
|
||||||
<div class="col-xs-2">{{ 'mautic.smartlinks.config.values.default'|trans }}</div>
|
<div class="col-xs-2">{{ 'mt3s.smart_links.config.values.default'|trans }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="utm-values-list" data-prototype="{{ form_widget(values.vars.prototype)|e('html_attr') }}">
|
<div class="utm-values-list" data-prototype="{{ form_widget(values.vars.prototype)|e('html_attr') }}">
|
||||||
{% for row in values %}
|
{% for row in values %}
|
||||||
{{ form_widget(row) }}
|
{{ form_widget(row) }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
<p class="text-muted small utm-values-empty{{ values|length > 0 ? ' hide' : '' }}">{{ 'mautic.smartlinks.config.values.empty'|trans }}</p>
|
<p class="text-muted small utm-values-empty{{ values|length > 0 ? ' hide' : '' }}">{{ 'mt3s.smart_links.config.values.empty'|trans }}</p>
|
||||||
|
|
||||||
<div class="mb-sm">
|
<div class="mb-sm">
|
||||||
<button type="button" class="btn btn-default btn-sm" data-utm-add-value>
|
<button type="button" class="btn btn-default btn-sm" data-utm-add-value>
|
||||||
<i class="ri-add-line"></i> {{ 'mautic.smartlinks.config.values.add'|trans }}
|
<i class="ri-add-line"></i> {{ 'mt3s.smart_links.config.values.add'|trans }}
|
||||||
</button>
|
</button>
|
||||||
{% if form.vars.utm_suggestions is not empty %}
|
{% if form.vars.utm_suggestions is not empty %}
|
||||||
<button type="button" class="btn btn-default btn-sm{{ values|length > 0 ? ' hide' : '' }}" data-utm-load-suggestions
|
<button type="button" class="btn btn-default btn-sm{{ values|length > 0 ? ' hide' : '' }}" data-utm-load-suggestions
|
||||||
data-utm-suggestions="{{ form.vars.utm_suggestions|json_encode|e('html_attr') }}">
|
data-utm-suggestions="{{ form.vars.utm_suggestions|json_encode|e('html_attr') }}">
|
||||||
<i class="ri-magic-line"></i> {{ 'mautic.smartlinks.config.values.suggestions'|trans }}
|
<i class="ri-magic-line"></i> {{ 'mt3s.smart_links.config.values.suggestions'|trans }}
|
||||||
</button>
|
</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<label class="control-label small" for="{{ form.vars.id }}_import">{{ 'mautic.smartlinks.config.values.import'|trans }}</label>
|
<label class="control-label small" for="{{ form.vars.id }}_import">{{ 'mt3s.smart_links.config.values.import'|trans }}</label>
|
||||||
<div class="input-group mb-sm">
|
<div class="input-group mb-sm">
|
||||||
{# Not a form field: the text is never submitted, the script turns it into value rows. #}
|
{# Not a form field: the text is never submitted, the script turns it into value rows. #}
|
||||||
<textarea id="{{ form.vars.id }}_import" class="form-control utm-import-text" rows="3"
|
<textarea id="{{ form.vars.id }}_import" class="form-control utm-import-text" rows="3"
|
||||||
placeholder="{{ 'mautic.smartlinks.config.values.import.placeholder'|trans }}"></textarea>
|
placeholder="{{ 'mt3s.smart_links.config.values.import.placeholder'|trans }}"></textarea>
|
||||||
<span class="input-group-btn">
|
<span class="input-group-btn">
|
||||||
<button type="button" class="btn btn-default" data-utm-import>{{ 'mautic.smartlinks.config.values.import.button'|trans }}</button>
|
<button type="button" class="btn btn-default" data-utm-import>{{ 'mt3s.smart_links.config.values.import.button'|trans }}</button>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -132,7 +132,7 @@
|
|||||||
|
|
||||||
{% if isCustom %}
|
{% if isCustom %}
|
||||||
<button type="button" class="btn btn-danger btn-sm" data-utm-remove-parameter>
|
<button type="button" class="btn btn-danger btn-sm" data-utm-remove-parameter>
|
||||||
<i class="ri-delete-bin-line"></i> {{ 'mautic.smartlinks.config.custom.remove'|trans }}
|
<i class="ri-delete-bin-line"></i> {{ 'mt3s.smart_links.config.custom.remove'|trans }}
|
||||||
</button>
|
</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
@@ -145,7 +145,7 @@
|
|||||||
{% set fields = form.children %}
|
{% set fields = form.children %}
|
||||||
<div class="row mb-xs utm-value-row">
|
<div class="row mb-xs utm-value-row">
|
||||||
<div class="col-xs-1">
|
<div class="col-xs-1">
|
||||||
<span class="btn btn-default btn-sm utm-value-handle" title="{{ 'mautic.smartlinks.config.values.drag'|trans }}"><i class="ri-draggable"></i></span>
|
<span class="btn btn-default btn-sm utm-value-handle" title="{{ 'mt3s.smart_links.config.values.drag'|trans }}"><i class="ri-draggable"></i></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-4">
|
<div class="col-xs-4">
|
||||||
{{ form_widget(fields.value) }}
|
{{ form_widget(fields.value) }}
|
||||||
@@ -156,12 +156,12 @@
|
|||||||
{{ form_errors(fields.label) }}
|
{{ form_errors(fields.label) }}
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-2">
|
<div class="col-xs-2">
|
||||||
<label class="checkbox-inline" title="{{ 'mautic.smartlinks.config.values.default'|trans }}">
|
<label class="checkbox-inline" title="{{ 'mt3s.smart_links.config.values.default'|trans }}">
|
||||||
{{ form_widget(fields.is_default) }}
|
{{ form_widget(fields.is_default) }}
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-1">
|
<div class="col-xs-1">
|
||||||
<button type="button" class="btn btn-default btn-sm" data-utm-remove-value title="{{ 'mautic.smartlinks.config.values.remove'|trans }}">
|
<button type="button" class="btn btn-default btn-sm" data-utm-remove-value title="{{ 'mt3s.smart_links.config.values.remove'|trans }}">
|
||||||
<i class="ri-delete-bin-line"></i>
|
<i class="ri-delete-bin-line"></i>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
{% extends '@MauticCore/Default/content.html.twig' %}
|
{% extends '@MauticCore/Default/content.html.twig' %}
|
||||||
|
|
||||||
{% block mauticContent %}smartlinksSmartLink{% endblock %}
|
{% block mauticContent %}mt3sMpSmartLink{% endblock %}
|
||||||
|
|
||||||
{% block headerTitle %}
|
{% block headerTitle %}
|
||||||
{% if form.vars.data.id %}
|
{% if form.vars.data.id %}
|
||||||
{{ 'mautic.smartlinks.smart_links.header.edit'|trans({'%slug%': form.vars.data.slug}) }}
|
{{ 'mt3s.smart_links.smart_links.header.edit'|trans({'%slug%': form.vars.data.slug}) }}
|
||||||
{% else %}
|
{% else %}
|
||||||
{{ 'mautic.smartlinks.smart_links.header.new'|trans }}
|
{{ 'mt3s.smart_links.smart_links.header.new'|trans }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
data-domain="{{ form.vars.smart_link_domain }}"
|
data-domain="{{ form.vars.smart_link_domain }}"
|
||||||
data-separator="{{ form.vars.smart_link_separator }}"
|
data-separator="{{ form.vars.smart_link_separator }}"
|
||||||
data-lowercase="{{ form.vars.smart_link_lowercase ? '1' : '0' }}">
|
data-lowercase="{{ form.vars.smart_link_lowercase ? '1' : '0' }}">
|
||||||
<span class="text-muted">{{ 'mautic.smartlinks.smart_links.domain.reminder'|trans }}</span>
|
<span class="text-muted">{{ 'mt3s.smart_links.smart_links.domain.reminder'|trans }}</span>
|
||||||
<code id="smartLinkPreview">{{ form.vars.smart_link_domain ? form.vars.smart_link_domain ~ '/l/' : '' }}{{ form.vars.smart_link_slug }}</code>
|
<code id="smartLinkPreview">{{ form.vars.smart_link_domain ? form.vars.smart_link_domain ~ '/l/' : '' }}{{ form.vars.smart_link_slug }}</code>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -30,9 +30,9 @@
|
|||||||
<span class="input-group-btn">
|
<span class="input-group-btn">
|
||||||
<button type="button" class="btn btn-default" id="smartLinkGenerateSlug"
|
<button type="button" class="btn btn-default" id="smartLinkGenerateSlug"
|
||||||
data-generated="{{ form.vars.smart_link_generated }}"
|
data-generated="{{ form.vars.smart_link_generated }}"
|
||||||
title="{{ 'mautic.smartlinks.smart_links.slug.generate.tooltip'|trans }}">
|
title="{{ 'mt3s.smart_links.smart_links.slug.generate.tooltip'|trans }}">
|
||||||
<i class="ri-refresh-line"></i>
|
<i class="ri-refresh-line"></i>
|
||||||
{{ 'mautic.smartlinks.smart_links.slug.generate'|trans }}
|
{{ 'mt3s.smart_links.smart_links.slug.generate'|trans }}
|
||||||
</button>
|
</button>
|
||||||
</span>
|
</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@@ -52,8 +52,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-md-3 height-auto">
|
<div class="col-md-3 height-auto">
|
||||||
<div class="pr-lg pl-lg pt-md pb-md">
|
<div class="pr-lg pl-lg pt-md pb-md">
|
||||||
<h4>{{ 'mautic.smartlinks.smart_links.utm_parameters'|trans }}</h4>
|
<h4>{{ 'mt3s.smart_links.smart_links.utm_parameters'|trans }}</h4>
|
||||||
<p class="text-muted small">{{ 'mautic.smartlinks.smart_links.utm_parameters.help'|trans }}</p>
|
<p class="text-muted small">{{ 'mt3s.smart_links.smart_links.utm_parameters.help'|trans }}</p>
|
||||||
{# One fieldset per taxonomy: Mautic's data-show-on switcher shows the one of the
|
{# One fieldset per taxonomy: Mautic's data-show-on switcher shows the one of the
|
||||||
chosen taxonomy (the container carries the col- class the switcher toggles). #}
|
chosen taxonomy (the container carries the col- class the switcher toggles). #}
|
||||||
{% for taxonomyId, fieldset in form.vars.smart_link_utm_fieldsets %}
|
{% for taxonomyId, fieldset in form.vars.smart_link_utm_fieldsets %}
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
{% set tmpl = 'list' %}
|
{% set tmpl = 'list' %}
|
||||||
{% extends isIndex ? '@MauticCore/Default/content.html.twig' : '@MauticCore/Default/raw_output.html.twig' %}
|
{% extends isIndex ? '@MauticCore/Default/content.html.twig' : '@MauticCore/Default/raw_output.html.twig' %}
|
||||||
|
|
||||||
{% block mauticContent %}smartlinksSmartLink{% endblock %}
|
{% block mauticContent %}mt3sMpSmartLink{% endblock %}
|
||||||
|
|
||||||
{% block headerTitle %}{{ 'mautic.smartlinks.smart_links.header.index'|trans }}{% endblock %}
|
{% block headerTitle %}{{ 'mt3s.smart_links.smart_links.header.index'|trans }}{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div id="page-list-wrapper" class="{% if items|length > 0 or searchValue is not empty %}panel {% endif %}panel-default">
|
<div id="page-list-wrapper" class="{% if items|length > 0 or searchValue is not empty %}panel {% endif %}panel-default">
|
||||||
@@ -18,11 +18,11 @@
|
|||||||
'templateButtons': {
|
'templateButtons': {
|
||||||
'new': permissions[permissionBase ~ ':create'],
|
'new': permissions[permissionBase ~ ':create'],
|
||||||
},
|
},
|
||||||
'langVar': 'smartlinks.smart_links',
|
'langVar': 'mt3smarketingprogram.smart_links',
|
||||||
'routeBase': 'smart_links',
|
'routeBase': 'smart_links',
|
||||||
},
|
},
|
||||||
'bulk_actions': {
|
'bulk_actions': {
|
||||||
'langVar': 'smartlinks.smart_links',
|
'langVar': 'mt3smarketingprogram.smart_links',
|
||||||
'templateButtons': {
|
'templateButtons': {
|
||||||
'delete': permissions[permissionBase ~ ':deleteown'] or permissions[permissionBase ~ ':deleteother'],
|
'delete': permissions[permissionBase ~ ':deleteown'] or permissions[permissionBase ~ ':deleteother'],
|
||||||
},
|
},
|
||||||
@@ -43,31 +43,31 @@
|
|||||||
{{ include('@MauticCore/Helper/tableheader.html.twig', {
|
{{ include('@MauticCore/Helper/tableheader.html.twig', {
|
||||||
'sessionVar': sessionVar,
|
'sessionVar': sessionVar,
|
||||||
'orderBy': tablePrefix ~ '.slug',
|
'orderBy': tablePrefix ~ '.slug',
|
||||||
'text': 'mautic.smartlinks.smart_links.short_link',
|
'text': 'mt3s.smart_links.smart_links.short_link',
|
||||||
'class': 'col-smart-link-slug',
|
'class': 'col-smart-link-slug',
|
||||||
'default': true,
|
'default': true,
|
||||||
}) }}
|
}) }}
|
||||||
{{ include('@MauticCore/Helper/tableheader.html.twig', {
|
{{ include('@MauticCore/Helper/tableheader.html.twig', {
|
||||||
'sessionVar': sessionVar,
|
'sessionVar': sessionVar,
|
||||||
'text': 'mautic.smartlinks.smart_links.taxonomy',
|
'text': 'mt3s.smart_links.smart_links.taxonomy',
|
||||||
'class': 'visible-md visible-lg col-smart-link-taxonomy',
|
'class': 'visible-md visible-lg col-smart-link-taxonomy',
|
||||||
}) }}
|
}) }}
|
||||||
{{ include('@MauticCore/Helper/tableheader.html.twig', {
|
{{ include('@MauticCore/Helper/tableheader.html.twig', {
|
||||||
'sessionVar': sessionVar,
|
'sessionVar': sessionVar,
|
||||||
'orderBy': tablePrefix ~ '.redirectType',
|
'orderBy': tablePrefix ~ '.redirectType',
|
||||||
'text': 'mautic.smartlinks.smart_links.redirect_type',
|
'text': 'mt3s.smart_links.smart_links.redirect_type',
|
||||||
'class': 'visible-md visible-lg col-smart-link-type',
|
'class': 'visible-md visible-lg col-smart-link-type',
|
||||||
}) }}
|
}) }}
|
||||||
{{ include('@MauticCore/Helper/tableheader.html.twig', {
|
{{ include('@MauticCore/Helper/tableheader.html.twig', {
|
||||||
'sessionVar': sessionVar,
|
'sessionVar': sessionVar,
|
||||||
'orderBy': tablePrefix ~ '.destinationUrl',
|
'orderBy': tablePrefix ~ '.destinationUrl',
|
||||||
'text': 'mautic.smartlinks.smart_links.destination_url',
|
'text': 'mt3s.smart_links.smart_links.destination_url',
|
||||||
'class': 'visible-md visible-lg col-smart-link-destination',
|
'class': 'visible-md visible-lg col-smart-link-destination',
|
||||||
}) }}
|
}) }}
|
||||||
{{ include('@MauticCore/Helper/tableheader.html.twig', {
|
{{ include('@MauticCore/Helper/tableheader.html.twig', {
|
||||||
'sessionVar': sessionVar,
|
'sessionVar': sessionVar,
|
||||||
'orderBy': tablePrefix ~ '.hitCount',
|
'orderBy': tablePrefix ~ '.hitCount',
|
||||||
'text': 'mautic.smartlinks.smart_links.hits',
|
'text': 'mt3s.smart_links.smart_links.hits',
|
||||||
'class': 'col-smart-link-hits',
|
'class': 'col-smart-link-hits',
|
||||||
}) }}
|
}) }}
|
||||||
{{ include('@MauticCore/Helper/tableheader.html.twig', {
|
{{ include('@MauticCore/Helper/tableheader.html.twig', {
|
||||||
@@ -89,7 +89,7 @@
|
|||||||
'edit': canEdit,
|
'edit': canEdit,
|
||||||
'delete': securityHasEntityAccess(permissions[permissionBase ~ ':deleteown'], permissions[permissionBase ~ ':deleteother'], item.createdBy),
|
'delete': securityHasEntityAccess(permissions[permissionBase ~ ':deleteown'], permissions[permissionBase ~ ':deleteother'], item.createdBy),
|
||||||
},
|
},
|
||||||
'langVar': 'smartlinks.smart_links',
|
'langVar': 'mt3smarketingprogram.smart_links',
|
||||||
'routeBase': 'smart_links',
|
'routeBase': 'smart_links',
|
||||||
}) -}}
|
}) -}}
|
||||||
</td>
|
</td>
|
||||||
@@ -107,14 +107,14 @@
|
|||||||
</td>
|
</td>
|
||||||
<td class="visible-md visible-lg">
|
<td class="visible-md visible-lg">
|
||||||
<span class="label label-{{ item.redirectType.value == 'mautic' ? 'info' : 'warning' }}">
|
<span class="label label-{{ item.redirectType.value == 'mautic' ? 'info' : 'warning' }}">
|
||||||
{{ ('mautic.smartlinks.smart_links.redirect_type.' ~ item.redirectType.value)|trans ~ ' · ' ~ item.redirectCode.value }}
|
{{ ('mt3s.smart_links.smart_links.redirect_type.' ~ item.redirectType.value)|trans ~ ' · ' ~ item.redirectCode.value }}
|
||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
<td class="visible-md visible-lg text-muted">
|
<td class="visible-md visible-lg text-muted">
|
||||||
{{ item.destinationLabel|default('—') }}
|
{{ item.destinationLabel|default('—') }}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<span class="label label-info" title="{{ 'mautic.smartlinks.smart_links.hits.tooltip'|trans }}">
|
<span class="label label-info" title="{{ 'mt3s.smart_links.smart_links.hits.tooltip'|trans }}">
|
||||||
{{ hitCounts[item.id]|default(0) }}
|
{{ hitCounts[item.id]|default(0) }}
|
||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
@@ -138,9 +138,9 @@
|
|||||||
{% else %}
|
{% else %}
|
||||||
<div class="mt-80 col-md-offset-2 col-lg-offset-3 col-md-8 col-lg-5 height-auto">
|
<div class="mt-80 col-md-offset-2 col-lg-offset-3 col-md-8 col-lg-5 height-auto">
|
||||||
{{ include('@MauticCore/Components/content-block.html.twig', {
|
{{ include('@MauticCore/Components/content-block.html.twig', {
|
||||||
'heading': 'mautic.smartlinks.smart_links.onboarding.heading',
|
'heading': 'mt3s.smart_links.smart_links.onboarding.heading',
|
||||||
'subheading': 'mautic.smartlinks.smart_links.onboarding.subheading',
|
'subheading': 'mt3s.smart_links.smart_links.onboarding.subheading',
|
||||||
'copy': 'mautic.smartlinks.smart_links.onboarding.copy',
|
'copy': 'mt3s.smart_links.smart_links.onboarding.copy',
|
||||||
}) }}
|
}) }}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
{% extends '@MauticCore/Default/content.html.twig' %}
|
{% extends '@MauticCore/Default/content.html.twig' %}
|
||||||
|
|
||||||
{% block mauticContent %}smartlinksUtmTaxonomy{% endblock %}
|
{% block mauticContent %}mt3sMpUtmTaxonomy{% endblock %}
|
||||||
|
|
||||||
{% block headerTitle %}
|
{% block headerTitle %}
|
||||||
{% if form.vars.data.id %}
|
{% if form.vars.data.id %}
|
||||||
{{ 'mautic.smartlinks.taxonomies.header.edit'|trans({'%name%': form.vars.data.name}) }}
|
{{ 'mt3s.smart_links.taxonomies.header.edit'|trans({'%name%': form.vars.data.name}) }}
|
||||||
{% else %}
|
{% else %}
|
||||||
{{ 'mautic.smartlinks.taxonomies.header.new'|trans }}
|
{{ 'mt3s.smart_links.taxonomies.header.new'|trans }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
@@ -18,8 +18,8 @@
|
|||||||
{{ form_row(form.name) }}
|
{{ form_row(form.name) }}
|
||||||
{{ form_row(form.description) }}
|
{{ form_row(form.description) }}
|
||||||
|
|
||||||
<h4 class="fw-sb mt-lg mb-xs">{{ 'mautic.smartlinks.taxonomies.parameters'|trans }}</h4>
|
<h4 class="fw-sb mt-lg mb-xs">{{ 'mt3s.smart_links.taxonomies.parameters'|trans }}</h4>
|
||||||
<p class="text-muted small">{{ 'mautic.smartlinks.taxonomies.parameters.help'|trans }}</p>
|
<p class="text-muted small">{{ 'mt3s.smart_links.taxonomies.parameters.help'|trans }}</p>
|
||||||
{{ form_errors(form.parameters) }}
|
{{ form_errors(form.parameters) }}
|
||||||
<div class="panel panel-default mb-md">
|
<div class="panel panel-default mb-md">
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
{% set tmpl = 'list' %}
|
{% set tmpl = 'list' %}
|
||||||
{% extends isIndex ? '@MauticCore/Default/content.html.twig' : '@MauticCore/Default/raw_output.html.twig' %}
|
{% extends isIndex ? '@MauticCore/Default/content.html.twig' : '@MauticCore/Default/raw_output.html.twig' %}
|
||||||
|
|
||||||
{% block mauticContent %}smartlinksUtmTaxonomy{% endblock %}
|
{% block mauticContent %}mt3sMpUtmTaxonomy{% endblock %}
|
||||||
|
|
||||||
{% block headerTitle %}{{ 'mautic.smartlinks.taxonomies.header.index'|trans }}{% endblock %}
|
{% block headerTitle %}{{ 'mt3s.smart_links.taxonomies.header.index'|trans }}{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div id="page-list-wrapper" class="{% if items|length > 0 or searchValue is not empty %}panel {% endif %}panel-default">
|
<div id="page-list-wrapper" class="{% if items|length > 0 or searchValue is not empty %}panel {% endif %}panel-default">
|
||||||
@@ -43,19 +43,19 @@
|
|||||||
{{ include('@MauticCore/Helper/tableheader.html.twig', {
|
{{ include('@MauticCore/Helper/tableheader.html.twig', {
|
||||||
'sessionVar': sessionVar,
|
'sessionVar': sessionVar,
|
||||||
'orderBy': tablePrefix ~ '.name',
|
'orderBy': tablePrefix ~ '.name',
|
||||||
'text': 'mautic.smartlinks.taxonomies.name',
|
'text': 'mt3s.smart_links.taxonomies.name',
|
||||||
'class': 'col-utm-taxonomy-name',
|
'class': 'col-utm-taxonomy-name',
|
||||||
'default': true,
|
'default': true,
|
||||||
}) }}
|
}) }}
|
||||||
{{ include('@MauticCore/Helper/tableheader.html.twig', {
|
{{ include('@MauticCore/Helper/tableheader.html.twig', {
|
||||||
'sessionVar': sessionVar,
|
'sessionVar': sessionVar,
|
||||||
'orderBy': tablePrefix ~ '.description',
|
'orderBy': tablePrefix ~ '.description',
|
||||||
'text': 'mautic.smartlinks.taxonomies.description',
|
'text': 'mt3s.smart_links.taxonomies.description',
|
||||||
'class': 'visible-md visible-lg col-utm-taxonomy-description',
|
'class': 'visible-md visible-lg col-utm-taxonomy-description',
|
||||||
}) }}
|
}) }}
|
||||||
{{ include('@MauticCore/Helper/tableheader.html.twig', {
|
{{ include('@MauticCore/Helper/tableheader.html.twig', {
|
||||||
'sessionVar': sessionVar,
|
'sessionVar': sessionVar,
|
||||||
'text': 'mautic.smartlinks.taxonomies.parameter_count',
|
'text': 'mt3s.smart_links.taxonomies.parameter_count',
|
||||||
'class': 'visible-md visible-lg col-utm-taxonomy-parameters',
|
'class': 'visible-md visible-lg col-utm-taxonomy-parameters',
|
||||||
}) }}
|
}) }}
|
||||||
{{ include('@MauticCore/Helper/tableheader.html.twig', {
|
{{ include('@MauticCore/Helper/tableheader.html.twig', {
|
||||||
@@ -92,7 +92,7 @@
|
|||||||
{{ item.description|default('—')|slice(0, 120) }}
|
{{ item.description|default('—')|slice(0, 120) }}
|
||||||
</td>
|
</td>
|
||||||
<td class="visible-md visible-lg">
|
<td class="visible-md visible-lg">
|
||||||
<span class="label label-info" title="{{ 'mautic.smartlinks.taxonomies.parameter_count.tooltip'|trans }}">
|
<span class="label label-info" title="{{ 'mt3s.smart_links.taxonomies.parameter_count.tooltip'|trans }}">
|
||||||
{{ item.parameters|length }}
|
{{ item.parameters|length }}
|
||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
@@ -116,9 +116,9 @@
|
|||||||
{% else %}
|
{% else %}
|
||||||
<div class="mt-80 col-md-offset-2 col-lg-offset-3 col-md-8 col-lg-5 height-auto">
|
<div class="mt-80 col-md-offset-2 col-lg-offset-3 col-md-8 col-lg-5 height-auto">
|
||||||
{{ include('@MauticCore/Components/content-block.html.twig', {
|
{{ include('@MauticCore/Components/content-block.html.twig', {
|
||||||
'heading': 'mautic.smartlinks.taxonomies.onboarding.heading',
|
'heading': 'mt3s.smart_links.taxonomies.onboarding.heading',
|
||||||
'subheading': 'mautic.smartlinks.taxonomies.onboarding.subheading',
|
'subheading': 'mt3s.smart_links.taxonomies.onboarding.subheading',
|
||||||
'copy': 'mautic.smartlinks.taxonomies.onboarding.copy',
|
'copy': 'mt3s.smart_links.taxonomies.onboarding.copy',
|
||||||
}) }}
|
}) }}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|||||||
@@ -24,14 +24,14 @@ class MT3SMarketingProgramPermissions extends AbstractPermissions
|
|||||||
{
|
{
|
||||||
parent::__construct($params);
|
parent::__construct($params);
|
||||||
|
|
||||||
$this->addStandardPermissions('categories');
|
$this->addStandardPermissions(['categories']);
|
||||||
$this->addExtendedPermissions('programs');
|
$this->addExtendedPermissions(['programs']);
|
||||||
$this->addExtendedPermissions('tasks');
|
$this->addExtendedPermissions(['tasks']);
|
||||||
$this->addExtendedPermissions('stakeholders');
|
$this->addExtendedPermissions(['stakeholders']);
|
||||||
$this->addExtendedPermissions('audiences');
|
$this->addExtendedPermissions(['audiences']);
|
||||||
$this->addExtendedPermissions('smart_links');
|
$this->addExtendedPermissions(['smart_links']);
|
||||||
$this->addExtendedPermissions('taxonomies');
|
$this->addExtendedPermissions(['taxonomies']);
|
||||||
$this->addStandardPermissions('itemtypes');
|
$this->addStandardPermissions(['itemtypes']);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getName(): string
|
public function getName(): string
|
||||||
|
|||||||
@@ -30,14 +30,21 @@ final class SmartLinkShortUrlBuilder
|
|||||||
{
|
{
|
||||||
$stored = $this->coreParametersHelper->get(SmartLinksConfigType::CONFIG_PARAMETER, []);
|
$stored = $this->coreParametersHelper->get(SmartLinksConfigType::CONFIG_PARAMETER, []);
|
||||||
|
|
||||||
// Upgrades from < 0.5.0 keep the domain in local.php under the legacy key; serve it until
|
// Upgrades keep the domain in local.php under a legacy key (the standalone
|
||||||
// the Configuration page is saved again (which writes the new key).
|
// SmartlinksBundle wrote `smartlinks_config`, the UtmManagerBundle before it
|
||||||
|
// `utm_manager_smart_links`); serve it until the Configuration page is saved again.
|
||||||
|
$legacyKeys = [
|
||||||
|
SmartLinksConfigType::LEGACY_SMARTLINKS_PARAMETER,
|
||||||
|
SmartLinksConfigType::LEGACY_CONFIG_PARAMETER,
|
||||||
|
];
|
||||||
|
foreach ($legacyKeys as $legacyKey) {
|
||||||
if (!is_array($stored) || '' === trim((string) ($stored['short_link_domain'] ?? ''))) {
|
if (!is_array($stored) || '' === trim((string) ($stored['short_link_domain'] ?? ''))) {
|
||||||
$legacy = $this->coreParametersHelper->get(SmartLinksConfigType::LEGACY_CONFIG_PARAMETER, []);
|
$legacy = $this->coreParametersHelper->get($legacyKey, []);
|
||||||
if (is_array($legacy) && '' !== trim((string) ($legacy['short_link_domain'] ?? ''))) {
|
if (is_array($legacy) && '' !== trim((string) ($legacy['short_link_domain'] ?? ''))) {
|
||||||
$stored = $legacy;
|
$stored = $legacy;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$domain = trim(is_array($stored) ? (string) ($stored['short_link_domain'] ?? '') : '');
|
$domain = trim(is_array($stored) ? (string) ($stored['short_link_domain'] ?? '') : '');
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ use MauticPlugin\MT3SMarketingProgramBundle\Catalog\UtmParameterDefinition;
|
|||||||
use MauticPlugin\MT3SMarketingProgramBundle\Catalog\UtmParameterMode;
|
use MauticPlugin\MT3SMarketingProgramBundle\Catalog\UtmParameterMode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Turns the stored `smartlinks_utm_config` array into a canonical, typed structure.
|
* Turns the stored `mt3s_smart_links_utm_config` array into a canonical, typed structure.
|
||||||
*
|
*
|
||||||
* - Every catalog parameter is present (catalog defaults fill the gaps), followed by valid custom parameters.
|
* - Every catalog parameter is present (catalog defaults fill the gaps), followed by valid custom parameters.
|
||||||
* - Mautic writes nested config scalars as strings ('1' / ''), so booleans are cast back.
|
* - Mautic writes nested config scalars as strings ('1' / ''), so booleans are cast back.
|
||||||
@@ -65,7 +65,7 @@ final class UtmConfigurationNormalizer
|
|||||||
*/
|
*/
|
||||||
private function normalizeParameter(mixed $stored, ?UtmParameterDefinition $definition): array
|
private function normalizeParameter(mixed $stored, ?UtmParameterDefinition $definition): array
|
||||||
{
|
{
|
||||||
$defaultMode = $definition?->defaultMode ?? UtmParameterMode::DISABLED;
|
$defaultMode = $definition->defaultMode ?? UtmParameterMode::DISABLED;
|
||||||
$allowedModes = $definition?->getAllowedModes() ?? UtmParameterMode::ALL;
|
$allowedModes = $definition?->getAllowedModes() ?? UtmParameterMode::ALL;
|
||||||
|
|
||||||
if (!is_array($stored)) {
|
if (!is_array($stored)) {
|
||||||
|
|||||||
@@ -10,8 +10,8 @@ use MauticPlugin\MT3SMarketingProgramBundle\Catalog\UtmParameterMode;
|
|||||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Read-only access to the UTM Manager configuration. Other services (e.g. the link builder)
|
* Read-only access to the Smart Links UTM configuration. Other services (e.g. the link builder)
|
||||||
* must use this class instead of reading `smartlinks_utm_config` from local.php.
|
* must use this class instead of reading `mt3s_smart_links_utm_config` from local.php.
|
||||||
*
|
*
|
||||||
* Every returned parameter has this shape:
|
* Every returned parameter has this shape:
|
||||||
* key, label, mode, enabled, group (standard|platform|custom), custom, auto_generated
|
* key, label, mode, enabled, group (standard|platform|custom), custom, auto_generated
|
||||||
@@ -19,7 +19,10 @@ use Symfony\Contracts\Translation\TranslatorInterface;
|
|||||||
*/
|
*/
|
||||||
final class UtmConfigurationProvider
|
final class UtmConfigurationProvider
|
||||||
{
|
{
|
||||||
public const CONFIG_PARAMETER = 'smartlinks_utm_config';
|
public const CONFIG_PARAMETER = 'mt3s_smart_links_utm_config';
|
||||||
|
|
||||||
|
/** Key of the standalone SmartlinksBundle era (0.1.0–0.18.0); still honored until the settings are saved again. */
|
||||||
|
public const LEGACY_SMARTLINKS_PARAMETER = 'smartlinks_utm_config';
|
||||||
|
|
||||||
/** Key of the UtmManagerBundle era (< 0.5.0); still honored until the settings are saved again. */
|
/** Key of the UtmManagerBundle era (< 0.5.0); still honored until the settings are saved again. */
|
||||||
public const LEGACY_CONFIG_PARAMETER = 'utm_manager_config';
|
public const LEGACY_CONFIG_PARAMETER = 'utm_manager_config';
|
||||||
@@ -94,14 +97,18 @@ final class UtmConfigurationProvider
|
|||||||
{
|
{
|
||||||
$raw = $this->coreParametersHelper->get(self::CONFIG_PARAMETER, []);
|
$raw = $this->coreParametersHelper->get(self::CONFIG_PARAMETER, []);
|
||||||
|
|
||||||
// Upgrades from < 0.5.0 keep their settings in local.php under the legacy key; serve them
|
// Upgrades keep their settings in local.php under a legacy key (the standalone
|
||||||
// until the Configuration page is saved again (which writes the new key).
|
// SmartlinksBundle wrote `smartlinks_utm_config`, the UtmManagerBundle before it
|
||||||
|
// `utm_manager_config`); serve them until the Configuration page is saved again
|
||||||
|
// (which writes the new key).
|
||||||
|
foreach ([self::LEGACY_SMARTLINKS_PARAMETER, self::LEGACY_CONFIG_PARAMETER] as $legacyKey) {
|
||||||
if (null === $raw || [] === $raw) {
|
if (null === $raw || [] === $raw) {
|
||||||
$legacy = $this->coreParametersHelper->get(self::LEGACY_CONFIG_PARAMETER, []);
|
$legacy = $this->coreParametersHelper->get($legacyKey, []);
|
||||||
if (null !== $legacy && [] !== $legacy) {
|
if (null !== $legacy && [] !== $legacy) {
|
||||||
$raw = $legacy;
|
$raw = $legacy;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return $this->normalizer->normalize($raw);
|
return $this->normalizer->normalize($raw);
|
||||||
}
|
}
|
||||||
@@ -120,9 +127,9 @@ final class UtmConfigurationProvider
|
|||||||
}
|
}
|
||||||
|
|
||||||
return ['key' => $key] + $parameter + [
|
return ['key' => $key] + $parameter + [
|
||||||
'group' => $definition?->group ?? UtmParameterCatalog::GROUP_CUSTOM,
|
'group' => $definition->group ?? UtmParameterCatalog::GROUP_CUSTOM,
|
||||||
'custom' => null === $definition,
|
'custom' => null === $definition,
|
||||||
'auto_generated' => $definition?->autoGenerated ?? false,
|
'auto_generated' => $definition->autoGenerated ?? false,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -51,8 +51,8 @@ final class UtmParameterCatalogTest extends TestCase
|
|||||||
$this->assertSame($mode, $definition->defaultMode, $key);
|
$this->assertSame($mode, $definition->defaultMode, $key);
|
||||||
$this->assertFalse($definition->autoGenerated, $key);
|
$this->assertFalse($definition->autoGenerated, $key);
|
||||||
$this->assertSame(UtmParameterMode::ALL, $definition->getAllowedModes(), $key);
|
$this->assertSame(UtmParameterMode::ALL, $definition->getAllowedModes(), $key);
|
||||||
$this->assertSame('mautic.smartlinks.config.parameter.'.$key.'.label', $definition->getLabelKey());
|
$this->assertSame('mt3s.smart_links.config.parameter.'.$key.'.label', $definition->getLabelKey());
|
||||||
$this->assertSame('mautic.smartlinks.config.parameter.'.$key.'.description', $definition->getDescriptionKey());
|
$this->assertSame('mt3s.smart_links.config.parameter.'.$key.'.description', $definition->getDescriptionKey());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -90,7 +90,7 @@ final class UtmParameterCatalogTest extends TestCase
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->assertSame('mautic.smartlinks.config.suggestion.google_ads', UtmParameterDefinition::getSuggestionLabelKey('google_ads'));
|
$this->assertSame('mt3s.smart_links.config.suggestion.google_ads', UtmParameterDefinition::getSuggestionLabelKey('google_ads'));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testGetAndHas(): void
|
public function testGetAndHas(): void
|
||||||
|
|||||||
@@ -50,8 +50,8 @@ final class SmartlinksSettingsTypeTest extends TypeTestCase
|
|||||||
$data = $form->getData();
|
$data = $form->getData();
|
||||||
$this->assertTrue($data['enforce_lowercase']);
|
$this->assertTrue($data['enforce_lowercase']);
|
||||||
$this->assertSame('-', $data['separator_replacement']);
|
$this->assertSame('-', $data['separator_replacement']);
|
||||||
$this->assertSame(['enabled' => true, 'label' => 'mautic.smartlinks.config.parameter.utm_campaign.label', 'mode' => 'free'], $data['parameters']['utm_campaign']);
|
$this->assertSame(['enabled' => true, 'label' => 'mt3s.smart_links.config.parameter.utm_campaign.label', 'mode' => 'free'], $data['parameters']['utm_campaign']);
|
||||||
$this->assertSame(['enabled' => false, 'label' => 'mautic.smartlinks.config.parameter.gclid.label', 'mode' => 'disabled'], $data['parameters']['gclid']);
|
$this->assertSame(['enabled' => false, 'label' => 'mt3s.smart_links.config.parameter.gclid.label', 'mode' => 'disabled'], $data['parameters']['gclid']);
|
||||||
$this->assertSame(['enabled', 'label', 'mode', 'values', 'default'], array_keys($data['parameters']['utm_source']));
|
$this->assertSame(['enabled', 'label', 'mode', 'values', 'default'], array_keys($data['parameters']['utm_source']));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -67,7 +67,7 @@ final class SmartlinksSettingsTypeTest extends TypeTestCase
|
|||||||
$form = $this->submit($submission);
|
$form = $this->submit($submission);
|
||||||
|
|
||||||
$this->assertSame([], $this->errorMessages($form));
|
$this->assertSame([], $this->errorMessages($form));
|
||||||
$this->assertSame(['enabled' => false, 'label' => 'mautic.smartlinks.config.parameter.utm_source.label', 'mode' => 'free'], $form->getData()['parameters']['utm_source']);
|
$this->assertSame(['enabled' => false, 'label' => 'mt3s.smart_links.config.parameter.utm_source.label', 'mode' => 'free'], $form->getData()['parameters']['utm_source']);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testEnabledDropdownWithoutValuesIsRejected(): void
|
public function testEnabledDropdownWithoutValuesIsRejected(): void
|
||||||
@@ -97,7 +97,7 @@ final class SmartlinksSettingsTypeTest extends TypeTestCase
|
|||||||
$this->assertSame([], $this->errorMessages($form));
|
$this->assertSame([], $this->errorMessages($form));
|
||||||
$this->assertSame([
|
$this->assertSame([
|
||||||
'enabled' => true,
|
'enabled' => true,
|
||||||
'label' => 'mautic.smartlinks.config.parameter.utm_source.label',
|
'label' => 'mt3s.smart_links.config.parameter.utm_source.label',
|
||||||
'mode' => 'dropdown',
|
'mode' => 'dropdown',
|
||||||
'values' => [
|
'values' => [
|
||||||
['value' => 'newsletter', 'label' => 'Newsletter'],
|
['value' => 'newsletter', 'label' => 'Newsletter'],
|
||||||
@@ -122,9 +122,9 @@ final class SmartlinksSettingsTypeTest extends TypeTestCase
|
|||||||
$values = $form->get('parameters')->get('utm_medium')->get('values');
|
$values = $form->get('parameters')->get('utm_medium')->get('values');
|
||||||
|
|
||||||
$this->assertSame([UtmSettingsValidator::ERROR_VALUE_DUPLICATE, UtmSettingsValidator::ERROR_DEFAULT_MULTIPLE], $this->messages($values));
|
$this->assertSame([UtmSettingsValidator::ERROR_VALUE_DUPLICATE, UtmSettingsValidator::ERROR_DEFAULT_MULTIPLE], $this->messages($values));
|
||||||
$this->assertSame(['mautic.smartlinks.config.error.value_invalid'], $this->messages($values->get('2')->get('value')));
|
$this->assertSame(['mt3s.smart_links.config.error.value_invalid'], $this->messages($values->get('2')->get('value')));
|
||||||
$this->assertSame(['mautic.smartlinks.config.error.value_length'], $this->messages($values->get('3')->get('value')));
|
$this->assertSame(['mt3s.smart_links.config.error.value_length'], $this->messages($values->get('3')->get('value')));
|
||||||
$this->assertSame(['mautic.smartlinks.config.error.label_required'], $this->messages($values->get('3')->get('label')));
|
$this->assertSame(['mt3s.smart_links.config.error.label_required'], $this->messages($values->get('3')->get('label')));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testDropdownModeIsRefusedForClickIds(): void
|
public function testDropdownModeIsRefusedForClickIds(): void
|
||||||
@@ -134,7 +134,7 @@ final class SmartlinksSettingsTypeTest extends TypeTestCase
|
|||||||
|
|
||||||
$form = $this->submit($submission);
|
$form = $this->submit($submission);
|
||||||
|
|
||||||
$this->assertSame(['mautic.smartlinks.config.error.mode_invalid'], $this->messages($form->get('parameters')->get('gclid')->get('mode')));
|
$this->assertSame(['mt3s.smart_links.config.error.mode_invalid'], $this->messages($form->get('parameters')->get('gclid')->get('mode')));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testCustomParameterIsStoredUnderItsKey(): void
|
public function testCustomParameterIsStoredUnderItsKey(): void
|
||||||
@@ -170,7 +170,7 @@ final class SmartlinksSettingsTypeTest extends TypeTestCase
|
|||||||
}
|
}
|
||||||
$this->assertSame([UtmSettingsValidator::ERROR_KEY_DUPLICATE], $this->messages($custom->get('5')->get('key')));
|
$this->assertSame([UtmSettingsValidator::ERROR_KEY_DUPLICATE], $this->messages($custom->get('5')->get('key')));
|
||||||
$this->assertSame([UtmSettingsValidator::ERROR_KEY_DUPLICATE], $this->messages($custom->get('6')->get('key')));
|
$this->assertSame([UtmSettingsValidator::ERROR_KEY_DUPLICATE], $this->messages($custom->get('6')->get('key')));
|
||||||
$this->assertSame(['mautic.smartlinks.config.error.key_required'], $this->messages($custom->get('7')->get('key')));
|
$this->assertSame(['mt3s.smart_links.config.error.key_required'], $this->messages($custom->get('7')->get('key')));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testLabelCannotContainPercent(): void
|
public function testLabelCannotContainPercent(): void
|
||||||
@@ -180,7 +180,7 @@ final class SmartlinksSettingsTypeTest extends TypeTestCase
|
|||||||
|
|
||||||
$form = $this->submit($submission);
|
$form = $this->submit($submission);
|
||||||
|
|
||||||
$this->assertSame(['mautic.smartlinks.config.error.label_invalid'], $this->messages($form->get('parameters')->get('utm_campaign')->get('label')));
|
$this->assertSame(['mt3s.smart_links.config.error.label_invalid'], $this->messages($form->get('parameters')->get('utm_campaign')->get('label')));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testStoredConfigurationIsLoadedIntoTheForm(): void
|
public function testStoredConfigurationIsLoadedIntoTheForm(): void
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ final class UtmFieldsApplicatorTest extends TestCase
|
|||||||
$this->assertInstanceOf(ChoiceType::class, $field->getConfig()->getType()->getInnerType());
|
$this->assertInstanceOf(ChoiceType::class, $field->getConfig()->getType()->getInnerType());
|
||||||
$this->assertSame(['newsletter', 'linkedin', 'google'], $field->getConfig()->getOption('choices'));
|
$this->assertSame(['newsletter', 'linkedin', 'google'], $field->getConfig()->getOption('choices'));
|
||||||
$this->assertSame('mautic.email.campaign_source', $field->getConfig()->getOption('label'), 'Native label kept');
|
$this->assertSame('mautic.email.campaign_source', $field->getConfig()->getOption('label'), 'Native label kept');
|
||||||
$this->assertSame('trans:mautic.smartlinks.form.choose', $field->getConfig()->getOption('placeholder'));
|
$this->assertSame('trans:mt3s.smart_links.form.choose', $field->getConfig()->getOption('placeholder'));
|
||||||
$this->assertNull($field->getConfig()->getOption('help'));
|
$this->assertNull($field->getConfig()->getOption('help'));
|
||||||
|
|
||||||
$view = $form->createView()['utmSource'];
|
$view = $form->createView()['utmSource'];
|
||||||
@@ -71,7 +71,7 @@ final class UtmFieldsApplicatorTest extends TestCase
|
|||||||
$this->assertFalse($form->isValid());
|
$this->assertFalse($form->isValid());
|
||||||
$errors = $form->get('utmSource')->getErrors();
|
$errors = $form->get('utmSource')->getErrors();
|
||||||
$this->assertCount(1, $errors);
|
$this->assertCount(1, $errors);
|
||||||
$this->assertSame('mautic.smartlinks.form.error.not_in_taxonomy', $errors[0]->getMessageTemplate());
|
$this->assertSame('mt3s.smart_links.form.error.not_in_taxonomy', $errors[0]->getMessageTemplate());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testFreeModeKeepsNativeTextField(): void
|
public function testFreeModeKeepsNativeTextField(): void
|
||||||
@@ -130,11 +130,11 @@ final class UtmFieldsApplicatorTest extends TestCase
|
|||||||
|
|
||||||
$field = $form->get('utmSource');
|
$field = $form->get('utmSource');
|
||||||
$this->assertSame(['newsletter', 'linkedin', 'google', 'Old Source'], $field->getConfig()->getOption('choices'));
|
$this->assertSame(['newsletter', 'linkedin', 'google', 'Old Source'], $field->getConfig()->getOption('choices'));
|
||||||
$this->assertSame('mautic.smartlinks.form.legacy_warning', $field->getConfig()->getOption('help'));
|
$this->assertSame('mt3s.smart_links.form.legacy_warning', $field->getConfig()->getOption('help'));
|
||||||
|
|
||||||
$view = $form->createView()['utmSource'];
|
$view = $form->createView()['utmSource'];
|
||||||
$this->assertSame('Old Source', $view->vars['value'], 'Legacy value selected');
|
$this->assertSame('Old Source', $view->vars['value'], 'Legacy value selected');
|
||||||
$this->assertSame('trans:mautic.smartlinks.form.legacy_choice|Old Source', end($view->vars['choices'])->label);
|
$this->assertSame('trans:mt3s.smart_links.form.legacy_choice|Old Source', end($view->vars['choices'])->label);
|
||||||
|
|
||||||
$form->submit(['utmSource' => 'Old Source']);
|
$form->submit(['utmSource' => 'Old Source']);
|
||||||
|
|
||||||
@@ -171,7 +171,7 @@ final class UtmFieldsApplicatorTest extends TestCase
|
|||||||
|
|
||||||
$field = $form->get('utmSource');
|
$field = $form->get('utmSource');
|
||||||
$this->assertSame([], $field->getConfig()->getOption('choices'));
|
$this->assertSame([], $field->getConfig()->getOption('choices'));
|
||||||
$this->assertSame('mautic.smartlinks.form.no_values', $field->getConfig()->getOption('help'));
|
$this->assertSame('mt3s.smart_links.form.no_values', $field->getConfig()->getOption('help'));
|
||||||
|
|
||||||
$form->submit(['utmSource' => '']);
|
$form->submit(['utmSource' => '']);
|
||||||
$this->assertTrue($form->isValid());
|
$this->assertTrue($form->isValid());
|
||||||
@@ -248,7 +248,7 @@ final class UtmFieldsApplicatorTest extends TestCase
|
|||||||
// Catalog labels translate to themselves, so an empty configured label resolves to the catalog key.
|
// Catalog labels translate to themselves, so an empty configured label resolves to the catalog key.
|
||||||
$translator = $this->createMock(TranslatorInterface::class);
|
$translator = $this->createMock(TranslatorInterface::class);
|
||||||
$translator->method('trans')->willReturnCallback(
|
$translator->method('trans')->willReturnCallback(
|
||||||
static fn (string $id, array $parameters = []): string => str_starts_with($id, 'mautic.smartlinks.config.parameter.')
|
static fn (string $id, array $parameters = []): string => str_starts_with($id, 'mt3s.smart_links.config.parameter.')
|
||||||
? $id
|
? $id
|
||||||
: 'trans:'.$id.([] === $parameters ? '' : '|'.implode(',', $parameters))
|
: 'trans:'.$id.([] === $parameters ? '' : '|'.implode(',', $parameters))
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -35,6 +35,9 @@ final class SmartLinkValidatorTest extends TestCase
|
|||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param array<string, mixed> $raw
|
||||||
|
*/
|
||||||
private function createValidator(array $raw = self::RAW_CONFIG): SmartLinkValidator
|
private function createValidator(array $raw = self::RAW_CONFIG): SmartLinkValidator
|
||||||
{
|
{
|
||||||
$parameters = $this->createMock(CoreParametersHelper::class);
|
$parameters = $this->createMock(CoreParametersHelper::class);
|
||||||
@@ -55,6 +58,9 @@ final class SmartLinkValidatorTest extends TestCase
|
|||||||
return new SmartLinkValidator($this->createMock(SmartLinkModel::class), $provider);
|
return new SmartLinkValidator($this->createMock(SmartLinkModel::class), $provider);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param array<string, mixed> $parameters
|
||||||
|
*/
|
||||||
private function createTaxonomy(array $parameters): UtmTaxonomy
|
private function createTaxonomy(array $parameters): UtmTaxonomy
|
||||||
{
|
{
|
||||||
$taxonomy = new UtmTaxonomy();
|
$taxonomy = new UtmTaxonomy();
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ use MauticPlugin\MT3SMarketingProgramBundle\Catalog\UtmParameterMode;
|
|||||||
use MauticPlugin\MT3SMarketingProgramBundle\Model\SmartLinkModel;
|
use MauticPlugin\MT3SMarketingProgramBundle\Model\SmartLinkModel;
|
||||||
use MauticPlugin\MT3SMarketingProgramBundle\Service\UtmConfigurationNormalizer;
|
use MauticPlugin\MT3SMarketingProgramBundle\Service\UtmConfigurationNormalizer;
|
||||||
use MauticPlugin\MT3SMarketingProgramBundle\Service\UtmConfigurationProvider;
|
use MauticPlugin\MT3SMarketingProgramBundle\Service\UtmConfigurationProvider;
|
||||||
use PHPUnit\Framework\MockObject\MockObject;
|
|
||||||
use PHPUnit\Framework\Attributes\DataProvider;
|
use PHPUnit\Framework\Attributes\DataProvider;
|
||||||
use PHPUnit\Framework\TestCase;
|
use PHPUnit\Framework\TestCase;
|
||||||
use Psr\Log\LoggerInterface;
|
use Psr\Log\LoggerInterface;
|
||||||
@@ -26,6 +25,8 @@ final class SmartLinkModelTest extends TestCase
|
|||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* A real provider with the given raw configuration, served through the normalizer.
|
* A real provider with the given raw configuration, served through the normalizer.
|
||||||
|
*
|
||||||
|
* @param array<string, mixed> $raw
|
||||||
*/
|
*/
|
||||||
private function createProvider(array $raw): UtmConfigurationProvider
|
private function createProvider(array $raw): UtmConfigurationProvider
|
||||||
{
|
{
|
||||||
@@ -47,6 +48,8 @@ final class SmartLinkModelTest extends TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* The model with mocked core dependencies; the UTM configuration is real.
|
* The model with mocked core dependencies; the UTM configuration is real.
|
||||||
|
*
|
||||||
|
* @param array<string, mixed> $raw
|
||||||
*/
|
*/
|
||||||
private function createModel(array $raw, ?PageModel $pageModel = null, ?UrlGeneratorInterface $router = null): SmartLinkModel
|
private function createModel(array $raw, ?PageModel $pageModel = null, ?UrlGeneratorInterface $router = null): SmartLinkModel
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ final class UtmConfigurationProviderTest extends TestCase
|
|||||||
$this->assertSame([
|
$this->assertSame([
|
||||||
'key' => 'utm_campaign',
|
'key' => 'utm_campaign',
|
||||||
'enabled' => true,
|
'enabled' => true,
|
||||||
'label' => 'translated:mautic.smartlinks.config.parameter.utm_campaign.label',
|
'label' => 'translated:mt3s.smart_links.config.parameter.utm_campaign.label',
|
||||||
'mode' => UtmParameterMode::FREE,
|
'mode' => UtmParameterMode::FREE,
|
||||||
'group' => UtmParameterCatalog::GROUP_STANDARD,
|
'group' => UtmParameterCatalog::GROUP_STANDARD,
|
||||||
'custom' => false,
|
'custom' => false,
|
||||||
@@ -171,6 +171,9 @@ final class UtmConfigurationProviderTest extends TestCase
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param array<string, mixed>|null $legacy
|
||||||
|
*/
|
||||||
private function createProvider(mixed $stored, ?array $legacy = null): UtmConfigurationProvider
|
private function createProvider(mixed $stored, ?array $legacy = null): UtmConfigurationProvider
|
||||||
{
|
{
|
||||||
$parameters = $this->createMock(CoreParametersHelper::class);
|
$parameters = $this->createMock(CoreParametersHelper::class);
|
||||||
|
|||||||
@@ -1,11 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
/*
|
|
||||||
* Finds the autoloader of the Mautic installation this plugin is mounted in
|
|
||||||
* (docroot/plugins/MT3SMarketingProgramBundle in the recommended project).
|
|
||||||
*/
|
|
||||||
$directory = __DIR__;
|
$directory = __DIR__;
|
||||||
for ($level = 0; $level < 6; ++$level) {
|
for ($level = 0; $level < 6; ++$level) {
|
||||||
$directory = dirname($directory);
|
$directory = dirname($directory);
|
||||||
|
|||||||
+191
-192
@@ -337,199 +337,198 @@ mt3s.marketing_program.config.currency.help="Users don't choose a currency: ever
|
|||||||
mt3s.marketing_program.config.type.icon="Pictogram"
|
mt3s.marketing_program.config.type.icon="Pictogram"
|
||||||
mt3s.marketing_program.config.type.icon.none="No pictogram"
|
mt3s.marketing_program.config.type.icon.none="No pictogram"
|
||||||
|
|
||||||
mautic.plugin.smartlinks.name="Smartlinks"
|
mt3s.smart_links.menu.root="Smart Links"
|
||||||
mautic.smartlinks.menu.root="Smart Links"
|
mt3s.smart_links.menu.smartlinks="Smart Links"
|
||||||
mautic.smartlinks.menu.smartlinks="Smart Links"
|
mt3s.smart_links.menu.taxonomies="UTM Taxonomies"
|
||||||
mautic.smartlinks.menu.taxonomies="UTM Taxonomies"
|
|
||||||
; Settings > Configuration tab title. Core builds this key from the form alias (mautic.config.tab.<alias>).
|
; Settings > Configuration tab title. Core builds this key from the form alias (mautic.config.tab.<alias>).
|
||||||
mautic.config.tab.smartlinksconfig="Smart Links Settings"
|
mautic.config.tab.smartlinksconfig="Smart Links Settings"
|
||||||
; Settings > Configuration > Smart Links Settings.
|
; Settings > Configuration > Smart Links Settings.
|
||||||
mautic.smartlinks.settings.description="Settings for Smart Links: the UTM parameters they carry, the general rules and the domain of their short links."
|
mt3s.smart_links.settings.description="Settings for Smart Links: the UTM parameters they carry, the general rules and the domain of their short links."
|
||||||
mautic.smartlinks.settings.short_link_domain="Short Link Domain"
|
mt3s.smart_links.settings.short_link_domain="Short Link Domain"
|
||||||
mautic.smartlinks.settings.short_link_domain.tooltip="Domain used to create future short links, for example lnk.example.com. Do not include https://."
|
mt3s.smart_links.settings.short_link_domain.tooltip="Domain used to create future short links, for example lnk.example.com. Do not include https://."
|
||||||
mautic.smartlinks.settings.placeholder="Smart Links will appear here."
|
mt3s.smart_links.settings.placeholder="Smart Links will appear here."
|
||||||
; Smart Links (main menu > Smart Links). Translation base mautic.smartlinks.smart_links.
|
; Smart Links (main menu > Smart Links). Translation base mt3s.smart_links.smart_links.
|
||||||
mautic.smartlinks.smart_links.header.index="Smart Links"
|
mt3s.smart_links.smart_links.header.index="Smart Links"
|
||||||
mautic.smartlinks.smart_links.header.new="New Smart Link"
|
mt3s.smart_links.smart_links.header.new="New Smart Link"
|
||||||
mautic.smartlinks.smart_links.header.edit="Smart Link - %slug%"
|
mt3s.smart_links.smart_links.header.edit="Smart Link - %slug%"
|
||||||
mautic.smartlinks.smart_links.slug="Slug"
|
mt3s.smart_links.smart_links.slug="Slug"
|
||||||
mautic.smartlinks.smart_links.slug.tooltip="Short text (max 9 characters). Spaces are replaced by the configured character, uppercase is turned into lowercase when the link is saved. The slug can't be changed after the link is created."
|
mt3s.smart_links.smart_links.slug.tooltip="Short text (max 9 characters). Spaces are replaced by the configured character, uppercase is turned into lowercase when the link is saved. The slug can't be changed after the link is created."
|
||||||
mautic.smartlinks.smart_links.slug.generate="Generate"
|
mt3s.smart_links.smart_links.slug.generate="Generate"
|
||||||
mautic.smartlinks.smart_links.slug.generate.tooltip="Use a random slug of 4 letters and digits."
|
mt3s.smart_links.smart_links.slug.generate.tooltip="Use a random slug of 4 letters and digits."
|
||||||
mautic.smartlinks.smart_links.short_link="Short link"
|
mt3s.smart_links.smart_links.short_link="Short link"
|
||||||
mautic.smartlinks.smart_links.domain.reminder="Short links domain:"
|
mt3s.smart_links.smart_links.domain.reminder="Short links domain:"
|
||||||
mautic.smartlinks.smart_links.domain.reminder.empty="No short links domain configured. Set it in Settings > Configuration > Smart Links Settings."
|
mt3s.smart_links.smart_links.domain.reminder.empty="No short links domain configured. Set it in Settings > Configuration > Smart Links Settings."
|
||||||
mautic.smartlinks.smart_links.redirect_type="Redirect type"
|
mt3s.smart_links.smart_links.redirect_type="Redirect type"
|
||||||
mautic.smartlinks.smart_links.redirect_type.mautic="Mautic"
|
mt3s.smart_links.smart_links.redirect_type.mautic="Mautic"
|
||||||
mautic.smartlinks.smart_links.redirect_type.external="External"
|
mt3s.smart_links.smart_links.redirect_type.external="External"
|
||||||
mautic.smartlinks.smart_links.redirect_code="Redirect HTTP code"
|
mt3s.smart_links.smart_links.redirect_code="Redirect HTTP code"
|
||||||
mautic.smartlinks.smart_links.redirect_code.301="301 - Moved permanently — permanent"
|
mt3s.smart_links.smart_links.redirect_code.301="301 - Moved permanently — permanent"
|
||||||
mautic.smartlinks.smart_links.redirect_code.302="302 - Found — temporary"
|
mt3s.smart_links.smart_links.redirect_code.302="302 - Found — temporary"
|
||||||
mautic.smartlinks.smart_links.redirect_code.307="307 - Temporary redirect — temporary"
|
mt3s.smart_links.smart_links.redirect_code.307="307 - Temporary redirect — temporary"
|
||||||
mautic.smartlinks.smart_links.redirect_code.308="308 - Permanent redirect — permanent"
|
mt3s.smart_links.smart_links.redirect_code.308="308 - Permanent redirect — permanent"
|
||||||
mautic.smartlinks.smart_links.destination_url="Destination URL"
|
mt3s.smart_links.smart_links.destination_url="Destination URL"
|
||||||
mautic.smartlinks.smart_links.destination_url.tooltip="Where the visitor lands, for example https://www.example.com/page. Only used for external redirects."
|
mt3s.smart_links.smart_links.destination_url.tooltip="Where the visitor lands, for example https://www.example.com/page. Only used for external redirects."
|
||||||
mautic.smartlinks.smart_links.destination="Destination"
|
mt3s.smart_links.smart_links.destination="Destination"
|
||||||
mautic.smartlinks.smart_links.destination.tooltip="The landing page or the standalone form the visitor is redirected to. Only used for Mautic redirects."
|
mt3s.smart_links.smart_links.destination.tooltip="The landing page or the standalone form the visitor is redirected to. Only used for Mautic redirects."
|
||||||
mautic.smartlinks.smart_links.destination.pages="Landing pages"
|
mt3s.smart_links.smart_links.destination.pages="Landing pages"
|
||||||
mautic.smartlinks.smart_links.destination.forms="Standalone forms"
|
mt3s.smart_links.smart_links.destination.forms="Standalone forms"
|
||||||
mautic.smartlinks.smart_links.destination.unpublished="No longer published"
|
mt3s.smart_links.smart_links.destination.unpublished="No longer published"
|
||||||
mautic.smartlinks.smart_links.utm_parameters="UTM parameters"
|
mt3s.smart_links.smart_links.utm_parameters="UTM parameters"
|
||||||
mautic.smartlinks.smart_links.utm_parameters.help="Choose the UTM Taxonomy first: each value below is picked among the values it allows."
|
mt3s.smart_links.smart_links.utm_parameters.help="Choose the UTM Taxonomy first: each value below is picked among the values it allows."
|
||||||
mautic.smartlinks.smart_links.onboarding.heading="No Smart Links yet"
|
mt3s.smart_links.smart_links.onboarding.heading="No Smart Links yet"
|
||||||
mautic.smartlinks.smart_links.onboarding.subheading="Smart Links are short links that carry your UTM parameters."
|
mt3s.smart_links.smart_links.onboarding.subheading="Smart Links are short links that carry your UTM parameters."
|
||||||
mautic.smartlinks.smart_links.onboarding.copy="Use the New button above to create one. Its slug can't be changed after creation; delete it and create a new one instead."
|
mt3s.smart_links.smart_links.onboarding.copy="Use the New button above to create one. Its slug can't be changed after creation; delete it and create a new one instead."
|
||||||
mautic.smartlinks.smart_links.menu.new="New Smart Link"
|
mt3s.smart_links.smart_links.menu.new="New Smart Link"
|
||||||
mautic.smartlinks.smart_links.menu.edit="Edit %name%"
|
mt3s.smart_links.smart_links.menu.edit="Edit %name%"
|
||||||
mautic.smartlinks.smart_links.menu.delete="Delete %name%"
|
mt3s.smart_links.smart_links.menu.delete="Delete %name%"
|
||||||
mautic.smartlinks.smart_links.form.confirmdelete="Delete the Smart Link %name%? It can't be restored."
|
mt3s.smart_links.smart_links.form.confirmdelete="Delete the Smart Link %name%? It can't be restored."
|
||||||
mautic.smartlinks.smart_links.form.confirmbatchdelete="Delete the selected Smart Links? They can't be restored."
|
mt3s.smart_links.smart_links.form.confirmbatchdelete="Delete the selected Smart Links? They can't be restored."
|
||||||
mautic.smartlinks.smart_links.error.notfound="No Smart Link with the ID %id% was found."
|
mt3s.smart_links.smart_links.error.notfound="No Smart Link with the ID %id% was found."
|
||||||
mautic.smartlinks.smart_links.permissions.header="Smart Links - User has access to"
|
mt3s.smart_links.smart_links.permissions.header="Smart Links - User has access to"
|
||||||
mautic.smartlinks.smart_links.hits="Hits"
|
mt3s.smart_links.smart_links.hits="Hits"
|
||||||
mautic.smartlinks.smart_links.hits.tooltip="Number of times the short link redirected a visitor."
|
mt3s.smart_links.smart_links.hits.tooltip="Number of times the short link redirected a visitor."
|
||||||
mautic.smartlinks.config.description="Define the UTM parameters offered by the link builder and how each one is presented."
|
mt3s.smart_links.config.description="Define the UTM parameters offered by the link builder and how each one is presented."
|
||||||
mautic.smartlinks.config.section.utm_settings="UTM Settings"
|
mt3s.smart_links.config.section.utm_settings="UTM Settings"
|
||||||
mautic.smartlinks.config.section.parameters="Parameters"
|
mt3s.smart_links.config.section.parameters="Parameters"
|
||||||
mautic.smartlinks.config.group.standard="Standard UTM"
|
mt3s.smart_links.config.group.standard="Standard UTM"
|
||||||
mautic.smartlinks.config.group.platform="Platform identifiers"
|
mt3s.smart_links.config.group.platform="Platform identifiers"
|
||||||
mautic.smartlinks.config.group.custom="Custom parameters"
|
mt3s.smart_links.config.group.custom="Custom parameters"
|
||||||
mautic.smartlinks.config.enforce_lowercase="Enforce lowercase on all values"
|
mt3s.smart_links.config.enforce_lowercase="Enforce lowercase on all values"
|
||||||
mautic.smartlinks.config.enforce_lowercase.tooltip="The link builder converts every parameter value to lowercase."
|
mt3s.smart_links.config.enforce_lowercase.tooltip="The link builder converts every parameter value to lowercase."
|
||||||
mautic.smartlinks.config.separator_replacement="Value separator replacement"
|
mt3s.smart_links.config.separator_replacement="Value separator replacement"
|
||||||
mautic.smartlinks.config.separator_replacement.tooltip="Character that replaces spaces in parameter values."
|
mt3s.smart_links.config.separator_replacement.tooltip="Character that replaces spaces in parameter values."
|
||||||
mautic.smartlinks.config.separator.hyphen="Hyphen ( - )"
|
mt3s.smart_links.config.separator.hyphen="Hyphen ( - )"
|
||||||
mautic.smartlinks.config.separator.underscore="Underscore ( _ )"
|
mt3s.smart_links.config.separator.underscore="Underscore ( _ )"
|
||||||
mautic.smartlinks.config.separator.dot="Dot ( . )"
|
mt3s.smart_links.config.separator.dot="Dot ( . )"
|
||||||
mautic.smartlinks.config.parameter.enabled="Enabled"
|
mt3s.smart_links.config.parameter.enabled="Enabled"
|
||||||
mautic.smartlinks.config.parameter.label="Label"
|
mt3s.smart_links.config.parameter.label="Label"
|
||||||
mautic.smartlinks.config.parameter.mode="Mode"
|
mt3s.smart_links.config.parameter.mode="Mode"
|
||||||
mautic.smartlinks.config.parameter.key="Key"
|
mt3s.smart_links.config.parameter.key="Key"
|
||||||
mautic.smartlinks.config.parameter.key.tooltip="Name of the URL parameter: lowercase letters, digits and underscores, starting with a letter (2 to 41 characters)."
|
mt3s.smart_links.config.parameter.key.tooltip="Name of the URL parameter: lowercase letters, digits and underscores, starting with a letter (2 to 41 characters)."
|
||||||
mautic.smartlinks.config.mode.dropdown="Dropdown (list of values)"
|
mt3s.smart_links.config.mode.dropdown="Dropdown (list of values)"
|
||||||
mautic.smartlinks.config.mode.free="Free text"
|
mt3s.smart_links.config.mode.free="Free text"
|
||||||
mautic.smartlinks.config.mode.disabled="Disabled"
|
mt3s.smart_links.config.mode.disabled="Disabled"
|
||||||
mautic.smartlinks.config.auto_generated.badge="Auto"
|
mt3s.smart_links.config.auto_generated.badge="Auto"
|
||||||
mautic.smartlinks.config.auto_generated.tooltip="Usually added automatically by the ad platform. Only enable if you need to handle it manually."
|
mt3s.smart_links.config.auto_generated.tooltip="Usually added automatically by the ad platform. Only enable if you need to handle it manually."
|
||||||
mautic.smartlinks.config.values="Allowed values"
|
mt3s.smart_links.config.values="Allowed values"
|
||||||
mautic.smartlinks.config.values.value="Value"
|
mt3s.smart_links.config.values.value="Value"
|
||||||
mautic.smartlinks.config.values.label="Label"
|
mt3s.smart_links.config.values.label="Label"
|
||||||
mautic.smartlinks.config.values.default="Default"
|
mt3s.smart_links.config.values.default="Default"
|
||||||
mautic.smartlinks.config.values.add="Add value"
|
mt3s.smart_links.config.values.add="Add value"
|
||||||
mautic.smartlinks.config.values.remove="Remove value"
|
mt3s.smart_links.config.values.remove="Remove value"
|
||||||
mautic.smartlinks.config.values.drag="Drag to reorder"
|
mt3s.smart_links.config.values.drag="Drag to reorder"
|
||||||
mautic.smartlinks.config.values.empty="No values yet."
|
mt3s.smart_links.config.values.empty="No values yet."
|
||||||
mautic.smartlinks.config.values.suggestions="Load suggested values"
|
mt3s.smart_links.config.values.suggestions="Load suggested values"
|
||||||
mautic.smartlinks.config.values.import="Paste values (one per line, or value;label)"
|
mt3s.smart_links.config.values.import="Paste values (one per line, or value;label)"
|
||||||
mautic.smartlinks.config.values.import.placeholder="newsletter;Newsletter"
|
mt3s.smart_links.config.values.import.placeholder="newsletter;Newsletter"
|
||||||
mautic.smartlinks.config.values.import.button="Import"
|
mt3s.smart_links.config.values.import.button="Import"
|
||||||
mautic.smartlinks.config.custom.add="Add custom parameter"
|
mt3s.smart_links.config.custom.add="Add custom parameter"
|
||||||
mautic.smartlinks.config.custom.remove="Delete"
|
mt3s.smart_links.config.custom.remove="Delete"
|
||||||
mautic.smartlinks.config.custom.new="new parameter"
|
mt3s.smart_links.config.custom.new="new parameter"
|
||||||
mautic.smartlinks.config.custom.empty="No custom parameters."
|
mt3s.smart_links.config.custom.empty="No custom parameters."
|
||||||
mautic.smartlinks.config.parameter.utm_source.label="Source"
|
mt3s.smart_links.config.parameter.utm_source.label="Source"
|
||||||
mautic.smartlinks.config.parameter.utm_source.description="Traffic origin, for example newsletter, linkedin or google."
|
mt3s.smart_links.config.parameter.utm_source.description="Traffic origin, for example newsletter, linkedin or google."
|
||||||
mautic.smartlinks.config.parameter.utm_medium.label="Medium"
|
mt3s.smart_links.config.parameter.utm_medium.label="Medium"
|
||||||
mautic.smartlinks.config.parameter.utm_medium.description="Channel type, for example email, cpc, social or referral."
|
mt3s.smart_links.config.parameter.utm_medium.description="Channel type, for example email, cpc, social or referral."
|
||||||
mautic.smartlinks.config.parameter.utm_campaign.label="Campaign"
|
mt3s.smart_links.config.parameter.utm_campaign.label="Campaign"
|
||||||
mautic.smartlinks.config.parameter.utm_campaign.description="Campaign name."
|
mt3s.smart_links.config.parameter.utm_campaign.description="Campaign name."
|
||||||
mautic.smartlinks.config.parameter.utm_term.label="Term"
|
mt3s.smart_links.config.parameter.utm_term.label="Term"
|
||||||
mautic.smartlinks.config.parameter.utm_term.description="Paid search keyword."
|
mt3s.smart_links.config.parameter.utm_term.description="Paid search keyword."
|
||||||
mautic.smartlinks.config.parameter.utm_content.label="Content"
|
mt3s.smart_links.config.parameter.utm_content.label="Content"
|
||||||
mautic.smartlinks.config.parameter.utm_content.description="Differentiates variants or links that point to the same URL."
|
mt3s.smart_links.config.parameter.utm_content.description="Differentiates variants or links that point to the same URL."
|
||||||
mautic.smartlinks.config.parameter.utm_id.label="Campaign ID"
|
mt3s.smart_links.config.parameter.utm_id.label="Campaign ID"
|
||||||
mautic.smartlinks.config.parameter.utm_id.description="Campaign ID, used by GA4 data import."
|
mt3s.smart_links.config.parameter.utm_id.description="Campaign ID, used by GA4 data import."
|
||||||
mautic.smartlinks.config.parameter.utm_source_platform.label="Source platform"
|
mt3s.smart_links.config.parameter.utm_source_platform.label="Source platform"
|
||||||
mautic.smartlinks.config.parameter.utm_source_platform.description="Platform that manages the campaign, for example Google Ads."
|
mt3s.smart_links.config.parameter.utm_source_platform.description="Platform that manages the campaign, for example Google Ads."
|
||||||
mautic.smartlinks.config.parameter.utm_creative_format.label="Creative format"
|
mt3s.smart_links.config.parameter.utm_creative_format.label="Creative format"
|
||||||
mautic.smartlinks.config.parameter.utm_creative_format.description="Creative type, for example display, video or native."
|
mt3s.smart_links.config.parameter.utm_creative_format.description="Creative type, for example display, video or native."
|
||||||
mautic.smartlinks.config.parameter.utm_marketing_tactic.label="Marketing tactic"
|
mt3s.smart_links.config.parameter.utm_marketing_tactic.label="Marketing tactic"
|
||||||
mautic.smartlinks.config.parameter.utm_marketing_tactic.description="Targeting tactic, for example prospecting or remarketing."
|
mt3s.smart_links.config.parameter.utm_marketing_tactic.description="Targeting tactic, for example prospecting or remarketing."
|
||||||
mautic.smartlinks.config.parameter.gclid.label="Google Ads click ID"
|
mt3s.smart_links.config.parameter.gclid.label="Google Ads click ID"
|
||||||
mautic.smartlinks.config.parameter.gclid.description="Click ID added by Google Ads."
|
mt3s.smart_links.config.parameter.gclid.description="Click ID added by Google Ads."
|
||||||
mautic.smartlinks.config.parameter.gbraid.label="Google Ads iOS web-to-app ID"
|
mt3s.smart_links.config.parameter.gbraid.label="Google Ads iOS web-to-app ID"
|
||||||
mautic.smartlinks.config.parameter.gbraid.description="Click ID added by Google Ads for iOS web-to-app measurement."
|
mt3s.smart_links.config.parameter.gbraid.description="Click ID added by Google Ads for iOS web-to-app measurement."
|
||||||
mautic.smartlinks.config.parameter.wbraid.label="Google Ads iOS app-to-web ID"
|
mt3s.smart_links.config.parameter.wbraid.label="Google Ads iOS app-to-web ID"
|
||||||
mautic.smartlinks.config.parameter.wbraid.description="Click ID added by Google Ads for iOS app-to-web measurement."
|
mt3s.smart_links.config.parameter.wbraid.description="Click ID added by Google Ads for iOS app-to-web measurement."
|
||||||
mautic.smartlinks.config.parameter.dclid.label="Display & Video 360 click ID"
|
mt3s.smart_links.config.parameter.dclid.label="Display & Video 360 click ID"
|
||||||
mautic.smartlinks.config.parameter.dclid.description="Click ID added by Google Display & Video 360."
|
mt3s.smart_links.config.parameter.dclid.description="Click ID added by Google Display & Video 360."
|
||||||
mautic.smartlinks.config.parameter.fbclid.label="Meta click ID"
|
mt3s.smart_links.config.parameter.fbclid.label="Meta click ID"
|
||||||
mautic.smartlinks.config.parameter.fbclid.description="Click ID added by Meta (Facebook, Instagram)."
|
mt3s.smart_links.config.parameter.fbclid.description="Click ID added by Meta (Facebook, Instagram)."
|
||||||
mautic.smartlinks.config.parameter.msclkid.label="Microsoft Advertising click ID"
|
mt3s.smart_links.config.parameter.msclkid.label="Microsoft Advertising click ID"
|
||||||
mautic.smartlinks.config.parameter.msclkid.description="Click ID added by Microsoft Advertising."
|
mt3s.smart_links.config.parameter.msclkid.description="Click ID added by Microsoft Advertising."
|
||||||
mautic.smartlinks.config.parameter.ttclid.label="TikTok click ID"
|
mt3s.smart_links.config.parameter.ttclid.label="TikTok click ID"
|
||||||
mautic.smartlinks.config.parameter.ttclid.description="Click ID added by TikTok."
|
mt3s.smart_links.config.parameter.ttclid.description="Click ID added by TikTok."
|
||||||
mautic.smartlinks.config.parameter.li_fat_id.label="LinkedIn click ID"
|
mt3s.smart_links.config.parameter.li_fat_id.label="LinkedIn click ID"
|
||||||
mautic.smartlinks.config.parameter.li_fat_id.description="Click ID added by LinkedIn."
|
mt3s.smart_links.config.parameter.li_fat_id.description="Click ID added by LinkedIn."
|
||||||
mautic.smartlinks.config.parameter.twclid.label="X click ID"
|
mt3s.smart_links.config.parameter.twclid.label="X click ID"
|
||||||
mautic.smartlinks.config.parameter.twclid.description="Click ID added by X (Twitter)."
|
mt3s.smart_links.config.parameter.twclid.description="Click ID added by X (Twitter)."
|
||||||
mautic.smartlinks.config.parameter.epik.label="Pinterest click ID"
|
mt3s.smart_links.config.parameter.epik.label="Pinterest click ID"
|
||||||
mautic.smartlinks.config.parameter.epik.description="Click ID added by Pinterest."
|
mt3s.smart_links.config.parameter.epik.description="Click ID added by Pinterest."
|
||||||
mautic.smartlinks.config.suggestion.newsletter="Newsletter"
|
mt3s.smart_links.config.suggestion.newsletter="Newsletter"
|
||||||
mautic.smartlinks.config.suggestion.linkedin="LinkedIn"
|
mt3s.smart_links.config.suggestion.linkedin="LinkedIn"
|
||||||
mautic.smartlinks.config.suggestion.facebook="Facebook"
|
mt3s.smart_links.config.suggestion.facebook="Facebook"
|
||||||
mautic.smartlinks.config.suggestion.instagram="Instagram"
|
mt3s.smart_links.config.suggestion.instagram="Instagram"
|
||||||
mautic.smartlinks.config.suggestion.google="Google"
|
mt3s.smart_links.config.suggestion.google="Google"
|
||||||
mautic.smartlinks.config.suggestion.youtube="YouTube"
|
mt3s.smart_links.config.suggestion.youtube="YouTube"
|
||||||
mautic.smartlinks.config.suggestion.x="X"
|
mt3s.smart_links.config.suggestion.x="X"
|
||||||
mautic.smartlinks.config.suggestion.tiktok="TikTok"
|
mt3s.smart_links.config.suggestion.tiktok="TikTok"
|
||||||
mautic.smartlinks.config.suggestion.partner="Partner"
|
mt3s.smart_links.config.suggestion.partner="Partner"
|
||||||
mautic.smartlinks.config.suggestion.direct="Direct"
|
mt3s.smart_links.config.suggestion.direct="Direct"
|
||||||
mautic.smartlinks.config.suggestion.email="Email"
|
mt3s.smart_links.config.suggestion.email="Email"
|
||||||
mautic.smartlinks.config.suggestion.cpc="Cost per click"
|
mt3s.smart_links.config.suggestion.cpc="Cost per click"
|
||||||
mautic.smartlinks.config.suggestion.social="Social"
|
mt3s.smart_links.config.suggestion.social="Social"
|
||||||
mautic.smartlinks.config.suggestion.social_paid="Paid social"
|
mt3s.smart_links.config.suggestion.social_paid="Paid social"
|
||||||
mautic.smartlinks.config.suggestion.display="Display"
|
mt3s.smart_links.config.suggestion.display="Display"
|
||||||
mautic.smartlinks.config.suggestion.affiliate="Affiliate"
|
mt3s.smart_links.config.suggestion.affiliate="Affiliate"
|
||||||
mautic.smartlinks.config.suggestion.referral="Referral"
|
mt3s.smart_links.config.suggestion.referral="Referral"
|
||||||
mautic.smartlinks.config.suggestion.qr="QR code"
|
mt3s.smart_links.config.suggestion.qr="QR code"
|
||||||
mautic.smartlinks.config.suggestion.sms="SMS"
|
mt3s.smart_links.config.suggestion.sms="SMS"
|
||||||
mautic.smartlinks.config.suggestion.print="Print"
|
mt3s.smart_links.config.suggestion.print="Print"
|
||||||
mautic.smartlinks.config.suggestion.event="Event"
|
mt3s.smart_links.config.suggestion.event="Event"
|
||||||
mautic.smartlinks.config.suggestion.google_ads="Google Ads"
|
mt3s.smart_links.config.suggestion.google_ads="Google Ads"
|
||||||
mautic.smartlinks.config.suggestion.meta_ads="Meta Ads"
|
mt3s.smart_links.config.suggestion.meta_ads="Meta Ads"
|
||||||
mautic.smartlinks.config.suggestion.linkedin_ads="LinkedIn Ads"
|
mt3s.smart_links.config.suggestion.linkedin_ads="LinkedIn Ads"
|
||||||
mautic.smartlinks.config.suggestion.microsoft_ads="Microsoft Ads"
|
mt3s.smart_links.config.suggestion.microsoft_ads="Microsoft Ads"
|
||||||
mautic.smartlinks.config.suggestion.tiktok_ads="TikTok Ads"
|
mt3s.smart_links.config.suggestion.tiktok_ads="TikTok Ads"
|
||||||
mautic.smartlinks.config.suggestion.banner="Banner"
|
mt3s.smart_links.config.suggestion.banner="Banner"
|
||||||
mautic.smartlinks.config.suggestion.video="Video"
|
mt3s.smart_links.config.suggestion.video="Video"
|
||||||
mautic.smartlinks.config.suggestion.carousel="Carousel"
|
mt3s.smart_links.config.suggestion.carousel="Carousel"
|
||||||
mautic.smartlinks.config.suggestion.text="Text"
|
mt3s.smart_links.config.suggestion.text="Text"
|
||||||
mautic.smartlinks.config.suggestion.native="Native"
|
mt3s.smart_links.config.suggestion.native="Native"
|
||||||
mautic.smartlinks.config.suggestion.prospecting="Prospecting"
|
mt3s.smart_links.config.suggestion.prospecting="Prospecting"
|
||||||
mautic.smartlinks.config.suggestion.remarketing="Remarketing"
|
mt3s.smart_links.config.suggestion.remarketing="Remarketing"
|
||||||
mautic.smartlinks.config.suggestion.retargeting="Retargeting"
|
mt3s.smart_links.config.suggestion.retargeting="Retargeting"
|
||||||
mautic.smartlinks.config.suggestion.brand="Brand"
|
mt3s.smart_links.config.suggestion.brand="Brand"
|
||||||
mautic.smartlinks.config.suggestion.nurturing="Nurturing"
|
mt3s.smart_links.config.suggestion.nurturing="Nurturing"
|
||||||
; "UTM tags" section of the Email and Focus Item forms.
|
; "UTM tags" section of the Email and Focus Item forms.
|
||||||
mautic.smartlinks.form.choose="Choose..."
|
mt3s.smart_links.form.choose="Choose..."
|
||||||
mautic.smartlinks.form.legacy_choice="%value% (not in taxonomy)"
|
mt3s.smart_links.form.legacy_choice="%value% (not in taxonomy)"
|
||||||
mautic.smartlinks.form.legacy_warning="This value is not part of the UTM taxonomy."
|
mt3s.smart_links.form.legacy_warning="This value is not part of the UTM taxonomy."
|
||||||
mautic.smartlinks.form.no_values="No values configured for this parameter. Ask an administrator."
|
mt3s.smart_links.form.no_values="No values configured for this parameter. Ask an administrator."
|
||||||
; Smart Link form and UTM Taxonomies (Smart Links > UTM Taxonomies). Translation base mautic.smartlinks.taxonomies.
|
; Smart Link form and UTM Taxonomies (Smart Links > UTM Taxonomies). Translation base mt3s.smart_links.taxonomies.
|
||||||
mautic.smartlinks.smart_links.taxonomy="UTM Taxonomy"
|
mt3s.smart_links.smart_links.taxonomy="UTM Taxonomy"
|
||||||
mautic.smartlinks.smart_links.taxonomy.tooltip="The set of allowed values for the UTM parameters of this link. Every value of the link is picked among the values the taxonomy allows."
|
mt3s.smart_links.smart_links.taxonomy.tooltip="The set of allowed values for the UTM parameters of this link. Every value of the link is picked among the values the taxonomy allows."
|
||||||
mautic.smartlinks.taxonomies.header.index="UTM Taxonomies"
|
mt3s.smart_links.taxonomies.header.index="UTM Taxonomies"
|
||||||
mautic.smartlinks.taxonomies.header.new="New UTM Taxonomy"
|
mt3s.smart_links.taxonomies.header.new="New UTM Taxonomy"
|
||||||
mautic.smartlinks.taxonomies.header.edit="UTM Taxonomy - %name%"
|
mt3s.smart_links.taxonomies.header.edit="UTM Taxonomy - %name%"
|
||||||
mautic.smartlinks.taxonomies.name="Name"
|
mt3s.smart_links.taxonomies.name="Name"
|
||||||
mautic.smartlinks.taxonomies.name.tooltip="A unique, short name identifying this set of allowed UTM values."
|
mt3s.smart_links.taxonomies.name.tooltip="A unique, short name identifying this set of allowed UTM values."
|
||||||
mautic.smartlinks.taxonomies.description="Description"
|
mt3s.smart_links.taxonomies.description="Description"
|
||||||
mautic.smartlinks.taxonomies.parameters="UTM parameters"
|
mt3s.smart_links.taxonomies.parameters="UTM parameters"
|
||||||
mautic.smartlinks.taxonomies.parameters.help="Every parameter enabled in Smart Links Settings appears. Dropdown parameters offer the values the admin configured: check the ones a Smart Link may carry. Free-text parameters get their own value list here: a link then picks a value from it instead of typing freely."
|
mt3s.smart_links.taxonomies.parameters.help="Every parameter enabled in Smart Links Settings appears. Dropdown parameters offer the values the admin configured: check the ones a Smart Link may carry. Free-text parameters get their own value list here: a link then picks a value from it instead of typing freely."
|
||||||
mautic.smartlinks.taxonomies.parameter_count="Parameters"
|
mt3s.smart_links.taxonomies.parameter_count="Parameters"
|
||||||
mautic.smartlinks.taxonomies.parameter_count.tooltip="The number of parameters this taxonomy defines values for."
|
mt3s.smart_links.taxonomies.parameter_count.tooltip="The number of parameters this taxonomy defines values for."
|
||||||
mautic.smartlinks.taxonomies.menu.new="New UTM Taxonomy"
|
mt3s.smart_links.taxonomies.menu.new="New UTM Taxonomy"
|
||||||
mautic.smartlinks.taxonomies.menu.edit="Edit %name%"
|
mt3s.smart_links.taxonomies.menu.edit="Edit %name%"
|
||||||
mautic.smartlinks.taxonomies.menu.delete="Delete %name%"
|
mt3s.smart_links.taxonomies.menu.delete="Delete %name%"
|
||||||
mautic.smartlinks.taxonomies.form.confirmdelete="Delete the UTM Taxonomy %name%? It cannot be restored. The Smart Links that use it keep the values they already carry and ask for a new taxonomy on their next edit."
|
mt3s.smart_links.taxonomies.form.confirmdelete="Delete the UTM Taxonomy %name%? It cannot be restored. The Smart Links that use it keep the values they already carry and ask for a new taxonomy on their next edit."
|
||||||
mautic.smartlinks.taxonomies.form.confirmbatchdelete="Delete the selected UTM Taxonomies? They cannot be restored."
|
mt3s.smart_links.taxonomies.form.confirmbatchdelete="Delete the selected UTM Taxonomies? They cannot be restored."
|
||||||
mautic.smartlinks.taxonomies.error.notfound="No UTM Taxonomy with the id %id%."
|
mt3s.smart_links.taxonomies.error.notfound="No UTM Taxonomy with the id %id%."
|
||||||
mautic.smartlinks.taxonomies.permissions.header="UTM Taxonomies - The user has access to"
|
mt3s.smart_links.taxonomies.permissions.header="UTM Taxonomies - The user has access to"
|
||||||
mautic.smartlinks.taxonomies.onboarding.heading="No UTM Taxonomies yet"
|
mt3s.smart_links.taxonomies.onboarding.heading="No UTM Taxonomies yet"
|
||||||
mautic.smartlinks.taxonomies.onboarding.subheading="UTM Taxonomies are sets of allowed values for the UTM parameters of your Smart Links."
|
mt3s.smart_links.taxonomies.onboarding.subheading="UTM Taxonomies are sets of allowed values for the UTM parameters of your Smart Links."
|
||||||
mautic.smartlinks.taxonomies.onboarding.copy="Use the New button above to create one. A Smart Link carries one taxonomy; every UTM value it carries is picked among the values the taxonomy allows."
|
mt3s.smart_links.taxonomies.onboarding.copy="Use the New button above to create one. A Smart Link carries one taxonomy; every UTM value it carries is picked among the values the taxonomy allows."
|
||||||
mautic.smartlinks.taxonomies.unpublished_choice="%name% (no longer published)"
|
mt3s.smart_links.taxonomies.unpublished_choice="%name% (no longer published)"
|
||||||
mautic.smartlinks.taxonomies.free_values.tooltip="The allowed values of this parameter for the links using this taxonomy. One value per line, optionally value;Label for a display label."
|
mt3s.smart_links.taxonomies.free_values.tooltip="The allowed values of this parameter for the links using this taxonomy. One value per line, optionally value;Label for a display label."
|
||||||
mautic.smartlinks.taxonomies.free_values.placeholder="one value per line"
|
mt3s.smart_links.taxonomies.free_values.placeholder="one value per line"
|
||||||
mautic.smartlinks.taxonomies.no_values.tooltip="No values are configured for this parameter in Smart Links Settings yet: ask the admin to configure some."
|
mt3s.smart_links.taxonomies.no_values.tooltip="No values are configured for this parameter in Smart Links Settings yet: ask the admin to configure some."
|
||||||
@@ -23,39 +23,39 @@ mt3s.marketing_program.config.type.in_use="These types are in use and can't be r
|
|||||||
mt3s.marketing_program.allocation_item.type.required="Choose a type."
|
mt3s.marketing_program.allocation_item.type.required="Choose a type."
|
||||||
|
|
||||||
; Form validation messages of Settings > Configuration > UTM Settings (Symfony translates them in the validators domain).
|
; Form validation messages of Settings > Configuration > UTM Settings (Symfony translates them in the validators domain).
|
||||||
mautic.smartlinks.config.error.key_required="Enter a key for the custom parameter."
|
mt3s.smart_links.config.error.key_required="Enter a key for the custom parameter."
|
||||||
mautic.smartlinks.config.error.key_invalid="The key \"%key%\" is invalid. Use 2 to 41 lowercase letters, digits or underscores, starting with a letter."
|
mt3s.smart_links.config.error.key_invalid="The key \"%key%\" is invalid. Use 2 to 41 lowercase letters, digits or underscores, starting with a letter."
|
||||||
mautic.smartlinks.config.error.key_reserved="The key \"%key%\" is reserved. Keys of the catalog, \"ct\", keys starting with \"utm\" and keys starting with \"mtc_\" can't be used."
|
mt3s.smart_links.config.error.key_reserved="The key \"%key%\" is reserved. Keys of the catalog, \"ct\", keys starting with \"utm\" and keys starting with \"mtc_\" can't be used."
|
||||||
mautic.smartlinks.config.error.key_duplicate="The key \"%key%\" is used by more than one custom parameter."
|
mt3s.smart_links.config.error.key_duplicate="The key \"%key%\" is used by more than one custom parameter."
|
||||||
mautic.smartlinks.config.error.mode_invalid="This mode isn't available for this parameter."
|
mt3s.smart_links.config.error.mode_invalid="This mode isn't available for this parameter."
|
||||||
mautic.smartlinks.config.error.separator_invalid="Choose a hyphen, an underscore or a dot."
|
mt3s.smart_links.config.error.separator_invalid="Choose a hyphen, an underscore or a dot."
|
||||||
mautic.smartlinks.config.error.label_required="Enter a label."
|
mt3s.smart_links.config.error.label_required="Enter a label."
|
||||||
mautic.smartlinks.config.error.label_length="The label can't be longer than {{ limit }} characters."
|
mt3s.smart_links.config.error.label_length="The label can't be longer than {{ limit }} characters."
|
||||||
mautic.smartlinks.config.error.label_invalid="The label can't contain the % character."
|
mt3s.smart_links.config.error.label_invalid="The label can't contain the % character."
|
||||||
mautic.smartlinks.config.error.value_required="Enter a value."
|
mt3s.smart_links.config.error.value_required="Enter a value."
|
||||||
mautic.smartlinks.config.error.value_length="The value can't be longer than {{ limit }} characters."
|
mt3s.smart_links.config.error.value_length="The value can't be longer than {{ limit }} characters."
|
||||||
mautic.smartlinks.config.error.value_invalid="Use only lowercase letters, digits, hyphens, underscores and dots in values."
|
mt3s.smart_links.config.error.value_invalid="Use only lowercase letters, digits, hyphens, underscores and dots in values."
|
||||||
mautic.smartlinks.config.error.value_duplicate="The value \"%value%\" appears more than once."
|
mt3s.smart_links.config.error.value_duplicate="The value \"%value%\" appears more than once."
|
||||||
mautic.smartlinks.config.error.values_required="An enabled parameter in dropdown mode needs at least one value."
|
mt3s.smart_links.config.error.values_required="An enabled parameter in dropdown mode needs at least one value."
|
||||||
mautic.smartlinks.config.error.default_multiple="Only one value can be the default."
|
mt3s.smart_links.config.error.default_multiple="Only one value can be the default."
|
||||||
; "UTM tags" section of the Email and Focus Item forms.
|
; "UTM tags" section of the Email and Focus Item forms.
|
||||||
mautic.smartlinks.form.error.not_in_taxonomy="This value is not part of the UTM taxonomy. Choose a value from the list."
|
mt3s.smart_links.form.error.not_in_taxonomy="This value is not part of the UTM taxonomy. Choose a value from the list."
|
||||||
; Smart Link form (main menu > Smart Links).
|
; Smart Link form (main menu > Smart Links).
|
||||||
mautic.smartlinks.smart_links.error.slug_required="Enter a slug."
|
mt3s.smart_links.smart_links.error.slug_required="Enter a slug."
|
||||||
mautic.smartlinks.smart_links.error.slug_length="The slug can't be longer than {{ limit }} characters."
|
mt3s.smart_links.smart_links.error.slug_length="The slug can't be longer than {{ limit }} characters."
|
||||||
mautic.smartlinks.smart_links.error.slug_characters="Use only letters, digits, hyphens, underscores and dots in the slug."
|
mt3s.smart_links.smart_links.error.slug_characters="Use only letters, digits, hyphens, underscores and dots in the slug."
|
||||||
mautic.smartlinks.smart_links.error.slug_taken="Another Smart Link already uses the slug \"%slug%\". Choose a different one."
|
mt3s.smart_links.smart_links.error.slug_taken="Another Smart Link already uses the slug \"%slug%\". Choose a different one."
|
||||||
mautic.smartlinks.smart_links.error.slug_immutable="The slug of a Smart Link can't be changed. Delete it and create a new one."
|
mt3s.smart_links.smart_links.error.slug_immutable="The slug of a Smart Link can't be changed. Delete it and create a new one."
|
||||||
mautic.smartlinks.smart_links.error.destination_required="Enter the destination URL of the external redirect."
|
mt3s.smart_links.smart_links.error.destination_required="Enter the destination URL of the external redirect."
|
||||||
mautic.smartlinks.smart_links.error.destination_required_mautic="Choose a landing page or a standalone form as the destination of the Mautic redirect."
|
mt3s.smart_links.smart_links.error.destination_required_mautic="Choose a landing page or a standalone form as the destination of the Mautic redirect."
|
||||||
mautic.smartlinks.smart_links.error.destination_invalid="The destination URL must be a valid http(s) URL."
|
mt3s.smart_links.smart_links.error.destination_invalid="The destination URL must be a valid http(s) URL."
|
||||||
mautic.smartlinks.smart_links.error.utm_value_invalid="The parameter \"%key%\" is not enabled, or its value is invalid. Use only lowercase letters, digits, hyphens, underscores and dots."
|
mt3s.smart_links.smart_links.error.utm_value_invalid="The parameter \"%key%\" is not enabled, or its value is invalid. Use only lowercase letters, digits, hyphens, underscores and dots."
|
||||||
mautic.smartlinks.smart_links.error.utm_value_not_allowed="The value \"%value%\" of the parameter \"%key%\" is not part of its allowed values."
|
mt3s.smart_links.smart_links.error.utm_value_not_allowed="The value \"%value%\" of the parameter \"%key%\" is not part of its allowed values."
|
||||||
; UTM Taxonomy form and taxonomy-driven Smart Link values.
|
; UTM Taxonomy form and taxonomy-driven Smart Link values.
|
||||||
mautic.smartlinks.taxonomies.error.name_required="Enter a name."
|
mt3s.smart_links.taxonomies.error.name_required="Enter a name."
|
||||||
mautic.smartlinks.taxonomies.error.name_length="The name cannot be longer than {{ limit }} characters."
|
mt3s.smart_links.taxonomies.error.name_length="The name cannot be longer than {{ limit }} characters."
|
||||||
mautic.smartlinks.taxonomies.error.name_taken="Another UTM Taxonomy already uses the name %name%."
|
mt3s.smart_links.taxonomies.error.name_taken="Another UTM Taxonomy already uses the name %name%."
|
||||||
mautic.smartlinks.taxonomies.error.name_characters="The name cannot contain the characters %, { or }."
|
mt3s.smart_links.taxonomies.error.name_characters="The name cannot contain the characters %, { or }."
|
||||||
mautic.smartlinks.taxonomies.error.value_invalid="The value %value% is invalid. Use only lowercase letters, digits, hyphens, underscores and dots."
|
mt3s.smart_links.taxonomies.error.value_invalid="The value %value% is invalid. Use only lowercase letters, digits, hyphens, underscores and dots."
|
||||||
mautic.smartlinks.smart_links.error.taxonomy_required="Choose a UTM Taxonomy."
|
mt3s.smart_links.smart_links.error.taxonomy_required="Choose a UTM Taxonomy."
|
||||||
mautic.smartlinks.smart_links.error.taxonomy_parameter_unknown="The parameter %key% is not part of the taxonomy %name%."
|
mt3s.smart_links.smart_links.error.taxonomy_parameter_unknown="The parameter %key% is not part of the taxonomy %name%."
|
||||||
+191
-192
@@ -1,210 +1,209 @@
|
|||||||
mautic.plugin.smartlinks.name="Smartlinks"
|
mt3s.smart_links.menu.root="Smart Links"
|
||||||
mautic.smartlinks.menu.root="Smart Links"
|
mt3s.smart_links.menu.smartlinks="Smart Links"
|
||||||
mautic.smartlinks.menu.smartlinks="Smart Links"
|
mt3s.smart_links.menu.taxonomies="Taxonomies UTM"
|
||||||
mautic.smartlinks.menu.taxonomies="Taxonomies UTM"
|
|
||||||
|
|
||||||
|
|
||||||
; Titre de l'onglet dans Paramètres > Configuration. Le cœur construit cette clé à partir de l'alias du formulaire.
|
; Titre de l'onglet dans Paramètres > Configuration. Le cœur construit cette clé à partir de l'alias du formulaire.
|
||||||
mautic.config.tab.smartlinksconfig="Paramètres Smart Links"
|
mautic.config.tab.smartlinksconfig="Paramètres Smart Links"
|
||||||
|
|
||||||
; Paramètres > Configuration > Smart Links Settings.
|
; Paramètres > Configuration > Smart Links Settings.
|
||||||
mautic.smartlinks.settings.description="Réglages des Smart Links : les paramètres UTM qu'ils transportent, les règles générales et le domaine de leurs liens courts."
|
mt3s.smart_links.settings.description="Réglages des Smart Links : les paramètres UTM qu'ils transportent, les règles générales et le domaine de leurs liens courts."
|
||||||
mautic.smartlinks.settings.short_link_domain="Domaine de liens courts"
|
mt3s.smart_links.settings.short_link_domain="Domaine de liens courts"
|
||||||
mautic.smartlinks.settings.short_link_domain.tooltip="Domaine utilisé pour créer les futurs liens courts, par exemple lnk.exemple.com. N'incluez pas https://."
|
mt3s.smart_links.settings.short_link_domain.tooltip="Domaine utilisé pour créer les futurs liens courts, par exemple lnk.exemple.com. N'incluez pas https://."
|
||||||
mautic.smartlinks.settings.placeholder="Les Smart Links apparaîtront ici."
|
mt3s.smart_links.settings.placeholder="Les Smart Links apparaîtront ici."
|
||||||
|
|
||||||
; Smart Links (menu principal > Smart Links). Base de traduction mautic.smartlinks.smart_links.
|
; Smart Links (menu principal > Smart Links). Base de traduction mt3s.smart_links.smart_links.
|
||||||
mautic.smartlinks.smart_links.header.index="Smart Links"
|
mt3s.smart_links.smart_links.header.index="Smart Links"
|
||||||
mautic.smartlinks.smart_links.header.new="Nouveau Smart Link"
|
mt3s.smart_links.smart_links.header.new="Nouveau Smart Link"
|
||||||
mautic.smartlinks.smart_links.header.edit="Smart Link - %slug%"
|
mt3s.smart_links.smart_links.header.edit="Smart Link - %slug%"
|
||||||
mautic.smartlinks.smart_links.slug="Slug"
|
mt3s.smart_links.smart_links.slug="Slug"
|
||||||
mautic.smartlinks.smart_links.slug.tooltip="Texte court (9 caractères maximum). Les espaces sont remplacés par le caractère configuré, les majuscules sont converties en minuscules à l'enregistrement. Le slug ne peut plus être modifié après la création du lien."
|
mt3s.smart_links.smart_links.slug.tooltip="Texte court (9 caractères maximum). Les espaces sont remplacés par le caractère configuré, les majuscules sont converties en minuscules à l'enregistrement. Le slug ne peut plus être modifié après la création du lien."
|
||||||
mautic.smartlinks.smart_links.slug.generate="Générer"
|
mt3s.smart_links.smart_links.slug.generate="Générer"
|
||||||
mautic.smartlinks.smart_links.slug.generate.tooltip="Utiliser un slug aléatoire de 4 lettres et chiffres."
|
mt3s.smart_links.smart_links.slug.generate.tooltip="Utiliser un slug aléatoire de 4 lettres et chiffres."
|
||||||
mautic.smartlinks.smart_links.short_link="Lien court"
|
mt3s.smart_links.smart_links.short_link="Lien court"
|
||||||
mautic.smartlinks.smart_links.domain.reminder="Domaine des liens courts :"
|
mt3s.smart_links.smart_links.domain.reminder="Domaine des liens courts :"
|
||||||
mautic.smartlinks.smart_links.domain.reminder.empty="Aucun domaine de liens courts configuré. Définissez-le dans Paramètres > Configuration > Paramètres Smart Links."
|
mt3s.smart_links.smart_links.domain.reminder.empty="Aucun domaine de liens courts configuré. Définissez-le dans Paramètres > Configuration > Paramètres Smart Links."
|
||||||
mautic.smartlinks.smart_links.redirect_type="Type de redirection"
|
mt3s.smart_links.smart_links.redirect_type="Type de redirection"
|
||||||
mautic.smartlinks.smart_links.redirect_type.mautic="Mautic"
|
mt3s.smart_links.smart_links.redirect_type.mautic="Mautic"
|
||||||
mautic.smartlinks.smart_links.redirect_type.external="Externe"
|
mt3s.smart_links.smart_links.redirect_type.external="Externe"
|
||||||
mautic.smartlinks.smart_links.redirect_code="Code HTTP de redirection"
|
mt3s.smart_links.smart_links.redirect_code="Code HTTP de redirection"
|
||||||
mautic.smartlinks.smart_links.redirect_code.301="301 - Déplacé de façon permanente — permanent"
|
mt3s.smart_links.smart_links.redirect_code.301="301 - Déplacé de façon permanente — permanent"
|
||||||
mautic.smartlinks.smart_links.redirect_code.302="302 - Trouvé — temporaire"
|
mt3s.smart_links.smart_links.redirect_code.302="302 - Trouvé — temporaire"
|
||||||
mautic.smartlinks.smart_links.redirect_code.307="307 - Redirection temporaire — temporaire"
|
mt3s.smart_links.smart_links.redirect_code.307="307 - Redirection temporaire — temporaire"
|
||||||
mautic.smartlinks.smart_links.redirect_code.308="308 - Redirection permanente — permanent"
|
mt3s.smart_links.smart_links.redirect_code.308="308 - Redirection permanente — permanent"
|
||||||
mautic.smartlinks.smart_links.destination_url="URL de destination"
|
mt3s.smart_links.smart_links.destination_url="URL de destination"
|
||||||
mautic.smartlinks.smart_links.destination_url.tooltip="Page d'arrivée du visiteur, par exemple https://www.exemple.com/page. Utilisée uniquement pour les redirections externes."
|
mt3s.smart_links.smart_links.destination_url.tooltip="Page d'arrivée du visiteur, par exemple https://www.exemple.com/page. Utilisée uniquement pour les redirections externes."
|
||||||
mautic.smartlinks.smart_links.destination="Destination"
|
mt3s.smart_links.smart_links.destination="Destination"
|
||||||
mautic.smartlinks.smart_links.destination.tooltip="La landing page ou le formulaire autonome vers lequel le visiteur est redirigé. Utilisé uniquement pour les redirections Mautic."
|
mt3s.smart_links.smart_links.destination.tooltip="La landing page ou le formulaire autonome vers lequel le visiteur est redirigé. Utilisé uniquement pour les redirections Mautic."
|
||||||
mautic.smartlinks.smart_links.destination.pages="Landing pages"
|
mt3s.smart_links.smart_links.destination.pages="Landing pages"
|
||||||
mautic.smartlinks.smart_links.destination.forms="Formulaires autonomes"
|
mt3s.smart_links.smart_links.destination.forms="Formulaires autonomes"
|
||||||
mautic.smartlinks.smart_links.destination.unpublished="Plus publié"
|
mt3s.smart_links.smart_links.destination.unpublished="Plus publié"
|
||||||
mautic.smartlinks.smart_links.utm_parameters="Paramètres UTM"
|
mt3s.smart_links.smart_links.utm_parameters="Paramètres UTM"
|
||||||
mautic.smartlinks.smart_links.utm_parameters.help="Choisissez d’abord la taxonomie UTM : chaque valeur ci-dessous est choisie parmi celles qu’elle autorise."
|
mt3s.smart_links.smart_links.utm_parameters.help="Choisissez d’abord la taxonomie UTM : chaque valeur ci-dessous est choisie parmi celles qu’elle autorise."
|
||||||
|
|
||||||
mautic.smartlinks.smart_links.onboarding.heading="Aucun Smart Link"
|
mt3s.smart_links.smart_links.onboarding.heading="Aucun Smart Link"
|
||||||
mautic.smartlinks.smart_links.onboarding.subheading="Les Smart Links sont des liens courts qui transportent vos paramètres UTM."
|
mt3s.smart_links.smart_links.onboarding.subheading="Les Smart Links sont des liens courts qui transportent vos paramètres UTM."
|
||||||
mautic.smartlinks.smart_links.onboarding.copy="Utilisez le bouton Nouveau ci-dessus pour en créer un. Son slug ne peut pas être modifié après la création ; supprimez-le et créez-en un nouveau."
|
mt3s.smart_links.smart_links.onboarding.copy="Utilisez le bouton Nouveau ci-dessus pour en créer un. Son slug ne peut pas être modifié après la création ; supprimez-le et créez-en un nouveau."
|
||||||
mautic.smartlinks.smart_links.menu.new="Nouveau Smart Link"
|
mt3s.smart_links.smart_links.menu.new="Nouveau Smart Link"
|
||||||
mautic.smartlinks.smart_links.menu.edit="Modifier %name%"
|
mt3s.smart_links.smart_links.menu.edit="Modifier %name%"
|
||||||
mautic.smartlinks.smart_links.menu.delete="Supprimer %name%"
|
mt3s.smart_links.smart_links.menu.delete="Supprimer %name%"
|
||||||
mautic.smartlinks.smart_links.form.confirmdelete="Supprimer le Smart Link %name% ? Il ne pourra pas être restauré."
|
mt3s.smart_links.smart_links.form.confirmdelete="Supprimer le Smart Link %name% ? Il ne pourra pas être restauré."
|
||||||
mautic.smartlinks.smart_links.form.confirmbatchdelete="Supprimer les Smart Links sélectionnés ? Ils ne pourront pas être restaurés."
|
mt3s.smart_links.smart_links.form.confirmbatchdelete="Supprimer les Smart Links sélectionnés ? Ils ne pourront pas être restaurés."
|
||||||
mautic.smartlinks.smart_links.error.notfound="Aucun Smart Link avec l'identifiant %id%."
|
mt3s.smart_links.smart_links.error.notfound="Aucun Smart Link avec l'identifiant %id%."
|
||||||
mautic.smartlinks.smart_links.permissions.header="Smart Links - L'utilisateur a accès à"
|
mt3s.smart_links.smart_links.permissions.header="Smart Links - L'utilisateur a accès à"
|
||||||
mautic.smartlinks.smart_links.hits="Clics"
|
mt3s.smart_links.smart_links.hits="Clics"
|
||||||
mautic.smartlinks.smart_links.hits.tooltip="Nombre de fois où le lien court a redirigé un visiteur."
|
mt3s.smart_links.smart_links.hits.tooltip="Nombre de fois où le lien court a redirigé un visiteur."
|
||||||
|
|
||||||
mautic.smartlinks.config.description="Définissez les paramètres UTM proposés par le générateur de liens et leur mode de saisie."
|
mt3s.smart_links.config.description="Définissez les paramètres UTM proposés par le générateur de liens et leur mode de saisie."
|
||||||
mautic.smartlinks.config.section.utm_settings="Paramètres UTM"
|
mt3s.smart_links.config.section.utm_settings="Paramètres UTM"
|
||||||
mautic.smartlinks.config.section.parameters="Paramètres"
|
mt3s.smart_links.config.section.parameters="Paramètres"
|
||||||
mautic.smartlinks.config.group.standard="UTM standards"
|
mt3s.smart_links.config.group.standard="UTM standards"
|
||||||
mautic.smartlinks.config.group.platform="Identifiants de plateformes"
|
mt3s.smart_links.config.group.platform="Identifiants de plateformes"
|
||||||
mautic.smartlinks.config.group.custom="Paramètres personnalisés"
|
mt3s.smart_links.config.group.custom="Paramètres personnalisés"
|
||||||
|
|
||||||
mautic.smartlinks.config.enforce_lowercase="Forcer les minuscules sur toutes les valeurs"
|
mt3s.smart_links.config.enforce_lowercase="Forcer les minuscules sur toutes les valeurs"
|
||||||
mautic.smartlinks.config.enforce_lowercase.tooltip="Le générateur de liens convertit toutes les valeurs des paramètres en minuscules."
|
mt3s.smart_links.config.enforce_lowercase.tooltip="Le générateur de liens convertit toutes les valeurs des paramètres en minuscules."
|
||||||
mautic.smartlinks.config.separator_replacement="Caractère de remplacement des espaces"
|
mt3s.smart_links.config.separator_replacement="Caractère de remplacement des espaces"
|
||||||
mautic.smartlinks.config.separator_replacement.tooltip="Caractère qui remplace les espaces dans les valeurs des paramètres."
|
mt3s.smart_links.config.separator_replacement.tooltip="Caractère qui remplace les espaces dans les valeurs des paramètres."
|
||||||
mautic.smartlinks.config.separator.hyphen="Tiret ( - )"
|
mt3s.smart_links.config.separator.hyphen="Tiret ( - )"
|
||||||
mautic.smartlinks.config.separator.underscore="Tiret bas ( _ )"
|
mt3s.smart_links.config.separator.underscore="Tiret bas ( _ )"
|
||||||
mautic.smartlinks.config.separator.dot="Point ( . )"
|
mt3s.smart_links.config.separator.dot="Point ( . )"
|
||||||
|
|
||||||
mautic.smartlinks.config.parameter.enabled="Activé"
|
mt3s.smart_links.config.parameter.enabled="Activé"
|
||||||
mautic.smartlinks.config.parameter.label="Libellé"
|
mt3s.smart_links.config.parameter.label="Libellé"
|
||||||
mautic.smartlinks.config.parameter.mode="Mode"
|
mt3s.smart_links.config.parameter.mode="Mode"
|
||||||
mautic.smartlinks.config.parameter.key="Clé"
|
mt3s.smart_links.config.parameter.key="Clé"
|
||||||
mautic.smartlinks.config.parameter.key.tooltip="Nom du paramètre dans l'URL : lettres minuscules, chiffres et tirets bas, commençant par une lettre (2 à 41 caractères)."
|
mt3s.smart_links.config.parameter.key.tooltip="Nom du paramètre dans l'URL : lettres minuscules, chiffres et tirets bas, commençant par une lettre (2 à 41 caractères)."
|
||||||
mautic.smartlinks.config.mode.dropdown="Liste déroulante (liste de valeurs)"
|
mt3s.smart_links.config.mode.dropdown="Liste déroulante (liste de valeurs)"
|
||||||
mautic.smartlinks.config.mode.free="Texte libre"
|
mt3s.smart_links.config.mode.free="Texte libre"
|
||||||
mautic.smartlinks.config.mode.disabled="Désactivé"
|
mt3s.smart_links.config.mode.disabled="Désactivé"
|
||||||
mautic.smartlinks.config.auto_generated.badge="Auto"
|
mt3s.smart_links.config.auto_generated.badge="Auto"
|
||||||
mautic.smartlinks.config.auto_generated.tooltip="Généralement ajouté automatiquement par la plateforme publicitaire. Activez-le uniquement si vous devez le gérer manuellement."
|
mt3s.smart_links.config.auto_generated.tooltip="Généralement ajouté automatiquement par la plateforme publicitaire. Activez-le uniquement si vous devez le gérer manuellement."
|
||||||
|
|
||||||
mautic.smartlinks.config.values="Valeurs autorisées"
|
mt3s.smart_links.config.values="Valeurs autorisées"
|
||||||
mautic.smartlinks.config.values.value="Valeur"
|
mt3s.smart_links.config.values.value="Valeur"
|
||||||
mautic.smartlinks.config.values.label="Libellé"
|
mt3s.smart_links.config.values.label="Libellé"
|
||||||
mautic.smartlinks.config.values.default="Par défaut"
|
mt3s.smart_links.config.values.default="Par défaut"
|
||||||
mautic.smartlinks.config.values.add="Ajouter une valeur"
|
mt3s.smart_links.config.values.add="Ajouter une valeur"
|
||||||
mautic.smartlinks.config.values.remove="Supprimer la valeur"
|
mt3s.smart_links.config.values.remove="Supprimer la valeur"
|
||||||
mautic.smartlinks.config.values.drag="Glisser pour réordonner"
|
mt3s.smart_links.config.values.drag="Glisser pour réordonner"
|
||||||
mautic.smartlinks.config.values.empty="Aucune valeur pour le moment."
|
mt3s.smart_links.config.values.empty="Aucune valeur pour le moment."
|
||||||
mautic.smartlinks.config.values.suggestions="Charger les valeurs suggérées"
|
mt3s.smart_links.config.values.suggestions="Charger les valeurs suggérées"
|
||||||
mautic.smartlinks.config.values.import="Coller des valeurs (une par ligne, ou valeur;libellé)"
|
mt3s.smart_links.config.values.import="Coller des valeurs (une par ligne, ou valeur;libellé)"
|
||||||
mautic.smartlinks.config.values.import.placeholder="newsletter;Newsletter"
|
mt3s.smart_links.config.values.import.placeholder="newsletter;Newsletter"
|
||||||
mautic.smartlinks.config.values.import.button="Importer"
|
mt3s.smart_links.config.values.import.button="Importer"
|
||||||
|
|
||||||
mautic.smartlinks.config.custom.add="Ajouter un paramètre personnalisé"
|
mt3s.smart_links.config.custom.add="Ajouter un paramètre personnalisé"
|
||||||
mautic.smartlinks.config.custom.remove="Supprimer"
|
mt3s.smart_links.config.custom.remove="Supprimer"
|
||||||
mautic.smartlinks.config.custom.new="nouveau paramètre"
|
mt3s.smart_links.config.custom.new="nouveau paramètre"
|
||||||
mautic.smartlinks.config.custom.empty="Aucun paramètre personnalisé."
|
mt3s.smart_links.config.custom.empty="Aucun paramètre personnalisé."
|
||||||
|
|
||||||
mautic.smartlinks.config.parameter.utm_source.label="Source"
|
mt3s.smart_links.config.parameter.utm_source.label="Source"
|
||||||
mautic.smartlinks.config.parameter.utm_source.description="Origine du trafic, par exemple newsletter, linkedin ou google."
|
mt3s.smart_links.config.parameter.utm_source.description="Origine du trafic, par exemple newsletter, linkedin ou google."
|
||||||
mautic.smartlinks.config.parameter.utm_medium.label="Support"
|
mt3s.smart_links.config.parameter.utm_medium.label="Support"
|
||||||
mautic.smartlinks.config.parameter.utm_medium.description="Type de canal, par exemple email, cpc, social ou referral."
|
mt3s.smart_links.config.parameter.utm_medium.description="Type de canal, par exemple email, cpc, social ou referral."
|
||||||
mautic.smartlinks.config.parameter.utm_campaign.label="Campagne"
|
mt3s.smart_links.config.parameter.utm_campaign.label="Campagne"
|
||||||
mautic.smartlinks.config.parameter.utm_campaign.description="Nom de la campagne."
|
mt3s.smart_links.config.parameter.utm_campaign.description="Nom de la campagne."
|
||||||
mautic.smartlinks.config.parameter.utm_term.label="Terme"
|
mt3s.smart_links.config.parameter.utm_term.label="Terme"
|
||||||
mautic.smartlinks.config.parameter.utm_term.description="Mot-clé de la recherche payante."
|
mt3s.smart_links.config.parameter.utm_term.description="Mot-clé de la recherche payante."
|
||||||
mautic.smartlinks.config.parameter.utm_content.label="Contenu"
|
mt3s.smart_links.config.parameter.utm_content.label="Contenu"
|
||||||
mautic.smartlinks.config.parameter.utm_content.description="Distingue les variantes ou les liens qui pointent vers la même URL."
|
mt3s.smart_links.config.parameter.utm_content.description="Distingue les variantes ou les liens qui pointent vers la même URL."
|
||||||
mautic.smartlinks.config.parameter.utm_id.label="ID de campagne"
|
mt3s.smart_links.config.parameter.utm_id.label="ID de campagne"
|
||||||
mautic.smartlinks.config.parameter.utm_id.description="Identifiant de campagne, utilisé par l'import de données GA4."
|
mt3s.smart_links.config.parameter.utm_id.description="Identifiant de campagne, utilisé par l'import de données GA4."
|
||||||
mautic.smartlinks.config.parameter.utm_source_platform.label="Plateforme source"
|
mt3s.smart_links.config.parameter.utm_source_platform.label="Plateforme source"
|
||||||
mautic.smartlinks.config.parameter.utm_source_platform.description="Plateforme qui gère la campagne, par exemple Google Ads."
|
mt3s.smart_links.config.parameter.utm_source_platform.description="Plateforme qui gère la campagne, par exemple Google Ads."
|
||||||
mautic.smartlinks.config.parameter.utm_creative_format.label="Format créatif"
|
mt3s.smart_links.config.parameter.utm_creative_format.label="Format créatif"
|
||||||
mautic.smartlinks.config.parameter.utm_creative_format.description="Type de création, par exemple display, vidéo ou native."
|
mt3s.smart_links.config.parameter.utm_creative_format.description="Type de création, par exemple display, vidéo ou native."
|
||||||
mautic.smartlinks.config.parameter.utm_marketing_tactic.label="Tactique marketing"
|
mt3s.smart_links.config.parameter.utm_marketing_tactic.label="Tactique marketing"
|
||||||
mautic.smartlinks.config.parameter.utm_marketing_tactic.description="Tactique de ciblage, par exemple prospection ou remarketing."
|
mt3s.smart_links.config.parameter.utm_marketing_tactic.description="Tactique de ciblage, par exemple prospection ou remarketing."
|
||||||
mautic.smartlinks.config.parameter.gclid.label="ID de clic Google Ads"
|
mt3s.smart_links.config.parameter.gclid.label="ID de clic Google Ads"
|
||||||
mautic.smartlinks.config.parameter.gclid.description="Identifiant de clic ajouté par Google Ads."
|
mt3s.smart_links.config.parameter.gclid.description="Identifiant de clic ajouté par Google Ads."
|
||||||
mautic.smartlinks.config.parameter.gbraid.label="ID Google Ads iOS web vers app"
|
mt3s.smart_links.config.parameter.gbraid.label="ID Google Ads iOS web vers app"
|
||||||
mautic.smartlinks.config.parameter.gbraid.description="Identifiant de clic ajouté par Google Ads pour la mesure iOS du web vers l'application."
|
mt3s.smart_links.config.parameter.gbraid.description="Identifiant de clic ajouté par Google Ads pour la mesure iOS du web vers l'application."
|
||||||
mautic.smartlinks.config.parameter.wbraid.label="ID Google Ads iOS app vers web"
|
mt3s.smart_links.config.parameter.wbraid.label="ID Google Ads iOS app vers web"
|
||||||
mautic.smartlinks.config.parameter.wbraid.description="Identifiant de clic ajouté par Google Ads pour la mesure iOS de l'application vers le web."
|
mt3s.smart_links.config.parameter.wbraid.description="Identifiant de clic ajouté par Google Ads pour la mesure iOS de l'application vers le web."
|
||||||
mautic.smartlinks.config.parameter.dclid.label="ID de clic Display & Video 360"
|
mt3s.smart_links.config.parameter.dclid.label="ID de clic Display & Video 360"
|
||||||
mautic.smartlinks.config.parameter.dclid.description="Identifiant de clic ajouté par Google Display & Video 360."
|
mt3s.smart_links.config.parameter.dclid.description="Identifiant de clic ajouté par Google Display & Video 360."
|
||||||
mautic.smartlinks.config.parameter.fbclid.label="ID de clic Meta"
|
mt3s.smart_links.config.parameter.fbclid.label="ID de clic Meta"
|
||||||
mautic.smartlinks.config.parameter.fbclid.description="Identifiant de clic ajouté par Meta (Facebook, Instagram)."
|
mt3s.smart_links.config.parameter.fbclid.description="Identifiant de clic ajouté par Meta (Facebook, Instagram)."
|
||||||
mautic.smartlinks.config.parameter.msclkid.label="ID de clic Microsoft Advertising"
|
mt3s.smart_links.config.parameter.msclkid.label="ID de clic Microsoft Advertising"
|
||||||
mautic.smartlinks.config.parameter.msclkid.description="Identifiant de clic ajouté par Microsoft Advertising."
|
mt3s.smart_links.config.parameter.msclkid.description="Identifiant de clic ajouté par Microsoft Advertising."
|
||||||
mautic.smartlinks.config.parameter.ttclid.label="ID de clic TikTok"
|
mt3s.smart_links.config.parameter.ttclid.label="ID de clic TikTok"
|
||||||
mautic.smartlinks.config.parameter.ttclid.description="Identifiant de clic ajouté par TikTok."
|
mt3s.smart_links.config.parameter.ttclid.description="Identifiant de clic ajouté par TikTok."
|
||||||
mautic.smartlinks.config.parameter.li_fat_id.label="ID de clic LinkedIn"
|
mt3s.smart_links.config.parameter.li_fat_id.label="ID de clic LinkedIn"
|
||||||
mautic.smartlinks.config.parameter.li_fat_id.description="Identifiant de clic ajouté par LinkedIn."
|
mt3s.smart_links.config.parameter.li_fat_id.description="Identifiant de clic ajouté par LinkedIn."
|
||||||
mautic.smartlinks.config.parameter.twclid.label="ID de clic X"
|
mt3s.smart_links.config.parameter.twclid.label="ID de clic X"
|
||||||
mautic.smartlinks.config.parameter.twclid.description="Identifiant de clic ajouté par X (Twitter)."
|
mt3s.smart_links.config.parameter.twclid.description="Identifiant de clic ajouté par X (Twitter)."
|
||||||
mautic.smartlinks.config.parameter.epik.label="ID de clic Pinterest"
|
mt3s.smart_links.config.parameter.epik.label="ID de clic Pinterest"
|
||||||
mautic.smartlinks.config.parameter.epik.description="Identifiant de clic ajouté par Pinterest."
|
mt3s.smart_links.config.parameter.epik.description="Identifiant de clic ajouté par Pinterest."
|
||||||
|
|
||||||
mautic.smartlinks.config.suggestion.newsletter="Newsletter"
|
mt3s.smart_links.config.suggestion.newsletter="Newsletter"
|
||||||
mautic.smartlinks.config.suggestion.linkedin="LinkedIn"
|
mt3s.smart_links.config.suggestion.linkedin="LinkedIn"
|
||||||
mautic.smartlinks.config.suggestion.facebook="Facebook"
|
mt3s.smart_links.config.suggestion.facebook="Facebook"
|
||||||
mautic.smartlinks.config.suggestion.instagram="Instagram"
|
mt3s.smart_links.config.suggestion.instagram="Instagram"
|
||||||
mautic.smartlinks.config.suggestion.google="Google"
|
mt3s.smart_links.config.suggestion.google="Google"
|
||||||
mautic.smartlinks.config.suggestion.youtube="YouTube"
|
mt3s.smart_links.config.suggestion.youtube="YouTube"
|
||||||
mautic.smartlinks.config.suggestion.x="X"
|
mt3s.smart_links.config.suggestion.x="X"
|
||||||
mautic.smartlinks.config.suggestion.tiktok="TikTok"
|
mt3s.smart_links.config.suggestion.tiktok="TikTok"
|
||||||
mautic.smartlinks.config.suggestion.partner="Partenaire"
|
mt3s.smart_links.config.suggestion.partner="Partenaire"
|
||||||
mautic.smartlinks.config.suggestion.direct="Direct"
|
mt3s.smart_links.config.suggestion.direct="Direct"
|
||||||
mautic.smartlinks.config.suggestion.email="E-mail"
|
mt3s.smart_links.config.suggestion.email="E-mail"
|
||||||
mautic.smartlinks.config.suggestion.cpc="Coût par clic"
|
mt3s.smart_links.config.suggestion.cpc="Coût par clic"
|
||||||
mautic.smartlinks.config.suggestion.social="Réseaux sociaux"
|
mt3s.smart_links.config.suggestion.social="Réseaux sociaux"
|
||||||
mautic.smartlinks.config.suggestion.social_paid="Réseaux sociaux payants"
|
mt3s.smart_links.config.suggestion.social_paid="Réseaux sociaux payants"
|
||||||
mautic.smartlinks.config.suggestion.display="Display"
|
mt3s.smart_links.config.suggestion.display="Display"
|
||||||
mautic.smartlinks.config.suggestion.affiliate="Affiliation"
|
mt3s.smart_links.config.suggestion.affiliate="Affiliation"
|
||||||
mautic.smartlinks.config.suggestion.referral="Site référent"
|
mt3s.smart_links.config.suggestion.referral="Site référent"
|
||||||
mautic.smartlinks.config.suggestion.qr="QR code"
|
mt3s.smart_links.config.suggestion.qr="QR code"
|
||||||
mautic.smartlinks.config.suggestion.sms="SMS"
|
mt3s.smart_links.config.suggestion.sms="SMS"
|
||||||
mautic.smartlinks.config.suggestion.print="Imprimé"
|
mt3s.smart_links.config.suggestion.print="Imprimé"
|
||||||
mautic.smartlinks.config.suggestion.event="Événement"
|
mt3s.smart_links.config.suggestion.event="Événement"
|
||||||
mautic.smartlinks.config.suggestion.google_ads="Google Ads"
|
mt3s.smart_links.config.suggestion.google_ads="Google Ads"
|
||||||
mautic.smartlinks.config.suggestion.meta_ads="Meta Ads"
|
mt3s.smart_links.config.suggestion.meta_ads="Meta Ads"
|
||||||
mautic.smartlinks.config.suggestion.linkedin_ads="LinkedIn Ads"
|
mt3s.smart_links.config.suggestion.linkedin_ads="LinkedIn Ads"
|
||||||
mautic.smartlinks.config.suggestion.microsoft_ads="Microsoft Ads"
|
mt3s.smart_links.config.suggestion.microsoft_ads="Microsoft Ads"
|
||||||
mautic.smartlinks.config.suggestion.tiktok_ads="TikTok Ads"
|
mt3s.smart_links.config.suggestion.tiktok_ads="TikTok Ads"
|
||||||
mautic.smartlinks.config.suggestion.banner="Bannière"
|
mt3s.smart_links.config.suggestion.banner="Bannière"
|
||||||
mautic.smartlinks.config.suggestion.video="Vidéo"
|
mt3s.smart_links.config.suggestion.video="Vidéo"
|
||||||
mautic.smartlinks.config.suggestion.carousel="Carrousel"
|
mt3s.smart_links.config.suggestion.carousel="Carrousel"
|
||||||
mautic.smartlinks.config.suggestion.text="Texte"
|
mt3s.smart_links.config.suggestion.text="Texte"
|
||||||
mautic.smartlinks.config.suggestion.native="Native"
|
mt3s.smart_links.config.suggestion.native="Native"
|
||||||
mautic.smartlinks.config.suggestion.prospecting="Prospection"
|
mt3s.smart_links.config.suggestion.prospecting="Prospection"
|
||||||
mautic.smartlinks.config.suggestion.remarketing="Remarketing"
|
mt3s.smart_links.config.suggestion.remarketing="Remarketing"
|
||||||
mautic.smartlinks.config.suggestion.retargeting="Retargeting"
|
mt3s.smart_links.config.suggestion.retargeting="Retargeting"
|
||||||
mautic.smartlinks.config.suggestion.brand="Marque"
|
mt3s.smart_links.config.suggestion.brand="Marque"
|
||||||
mautic.smartlinks.config.suggestion.nurturing="Nurturing"
|
mt3s.smart_links.config.suggestion.nurturing="Nurturing"
|
||||||
|
|
||||||
; Section « UTM tags » des formulaires Email et Focus.
|
; Section « UTM tags » des formulaires Email et Focus.
|
||||||
mautic.smartlinks.form.choose="Choisir..."
|
mt3s.smart_links.form.choose="Choisir..."
|
||||||
mautic.smartlinks.form.legacy_choice="%value% (hors taxonomie)"
|
mt3s.smart_links.form.legacy_choice="%value% (hors taxonomie)"
|
||||||
mautic.smartlinks.form.legacy_warning="Cette valeur ne fait pas partie de la taxonomie UTM."
|
mt3s.smart_links.form.legacy_warning="Cette valeur ne fait pas partie de la taxonomie UTM."
|
||||||
mautic.smartlinks.form.no_values="Aucune valeur configurée pour ce paramètre. Contactez un administrateur."
|
mt3s.smart_links.form.no_values="Aucune valeur configurée pour ce paramètre. Contactez un administrateur."
|
||||||
|
|
||||||
; Formulaire Smart Link et taxonomies UTM (Smart Links > Taxonomies UTM). Base de traduction mautic.smartlinks.taxonomies.
|
; Formulaire Smart Link et taxonomies UTM (Smart Links > Taxonomies UTM). Base de traduction mt3s.smart_links.taxonomies.
|
||||||
mautic.smartlinks.smart_links.taxonomy="Taxonomie UTM"
|
mt3s.smart_links.smart_links.taxonomy="Taxonomie UTM"
|
||||||
mautic.smartlinks.smart_links.taxonomy.tooltip="L’ensemble des valeurs autorisées pour les paramètres UTM de ce lien. Chaque valeur du lien est choisie parmi celles qu’autorise la taxonomie."
|
mt3s.smart_links.smart_links.taxonomy.tooltip="L’ensemble des valeurs autorisées pour les paramètres UTM de ce lien. Chaque valeur du lien est choisie parmi celles qu’autorise la taxonomie."
|
||||||
mautic.smartlinks.taxonomies.header.index="Taxonomies UTM"
|
mt3s.smart_links.taxonomies.header.index="Taxonomies UTM"
|
||||||
mautic.smartlinks.taxonomies.header.new="Nouvelle taxonomie UTM"
|
mt3s.smart_links.taxonomies.header.new="Nouvelle taxonomie UTM"
|
||||||
mautic.smartlinks.taxonomies.header.edit="Taxonomie UTM - %name%"
|
mt3s.smart_links.taxonomies.header.edit="Taxonomie UTM - %name%"
|
||||||
mautic.smartlinks.taxonomies.name="Nom"
|
mt3s.smart_links.taxonomies.name="Nom"
|
||||||
mautic.smartlinks.taxonomies.name.tooltip="Un nom court et unique identifiant cet ensemble de valeurs UTM autorisées."
|
mt3s.smart_links.taxonomies.name.tooltip="Un nom court et unique identifiant cet ensemble de valeurs UTM autorisées."
|
||||||
mautic.smartlinks.taxonomies.description="Description"
|
mt3s.smart_links.taxonomies.description="Description"
|
||||||
mautic.smartlinks.taxonomies.parameters="Paramètres UTM"
|
mt3s.smart_links.taxonomies.parameters="Paramètres UTM"
|
||||||
mautic.smartlinks.taxonomies.parameters.help="Chaque paramètre activé dans Paramètres Smart Links apparaît. Les paramètres en liste déroulante offrent les valeurs définies par l’administrateur : cochez celles qu’un Smart Link peut porter. Les paramètres en texte libre reçoivent ici leur propre liste de valeurs : le lien y choisira une valeur au lieu de saisir librement."
|
mt3s.smart_links.taxonomies.parameters.help="Chaque paramètre activé dans Paramètres Smart Links apparaît. Les paramètres en liste déroulante offrent les valeurs définies par l’administrateur : cochez celles qu’un Smart Link peut porter. Les paramètres en texte libre reçoivent ici leur propre liste de valeurs : le lien y choisira une valeur au lieu de saisir librement."
|
||||||
mautic.smartlinks.taxonomies.parameter_count="Paramètres"
|
mt3s.smart_links.taxonomies.parameter_count="Paramètres"
|
||||||
mautic.smartlinks.taxonomies.parameter_count.tooltip="Le nombre de paramètres pour lesquels cette taxonomie définit des valeurs."
|
mt3s.smart_links.taxonomies.parameter_count.tooltip="Le nombre de paramètres pour lesquels cette taxonomie définit des valeurs."
|
||||||
mautic.smartlinks.taxonomies.menu.new="Nouvelle taxonomie UTM"
|
mt3s.smart_links.taxonomies.menu.new="Nouvelle taxonomie UTM"
|
||||||
mautic.smartlinks.taxonomies.menu.edit="Modifier %name%"
|
mt3s.smart_links.taxonomies.menu.edit="Modifier %name%"
|
||||||
mautic.smartlinks.taxonomies.menu.delete="Supprimer %name%"
|
mt3s.smart_links.taxonomies.menu.delete="Supprimer %name%"
|
||||||
mautic.smartlinks.taxonomies.form.confirmdelete="Supprimer la taxonomie UTM %name% ? Elle ne pourra pas être restaurée. Les Smart Links qui l’utilisent conservent les valeurs qu’ils portent déjà et demanderont une nouvelle taxonomie à leur prochaine modification."
|
mt3s.smart_links.taxonomies.form.confirmdelete="Supprimer la taxonomie UTM %name% ? Elle ne pourra pas être restaurée. Les Smart Links qui l’utilisent conservent les valeurs qu’ils portent déjà et demanderont une nouvelle taxonomie à leur prochaine modification."
|
||||||
mautic.smartlinks.taxonomies.form.confirmbatchdelete="Supprimer les taxonomies UTM sélectionnées ? Elles ne pourront pas être restaurées."
|
mt3s.smart_links.taxonomies.form.confirmbatchdelete="Supprimer les taxonomies UTM sélectionnées ? Elles ne pourront pas être restaurées."
|
||||||
mautic.smartlinks.taxonomies.error.notfound="Aucune taxonomie UTM avec l’identifiant %id%."
|
mt3s.smart_links.taxonomies.error.notfound="Aucune taxonomie UTM avec l’identifiant %id%."
|
||||||
mautic.smartlinks.taxonomies.permissions.header="Taxonomies UTM - L’utilisateur a accès à"
|
mt3s.smart_links.taxonomies.permissions.header="Taxonomies UTM - L’utilisateur a accès à"
|
||||||
mautic.smartlinks.taxonomies.onboarding.heading="Aucune taxonomie UTM"
|
mt3s.smart_links.taxonomies.onboarding.heading="Aucune taxonomie UTM"
|
||||||
mautic.smartlinks.taxonomies.onboarding.subheading="Les taxonomies UTM sont des ensembles de valeurs autorisées pour les paramètres UTM de vos Smart Links."
|
mt3s.smart_links.taxonomies.onboarding.subheading="Les taxonomies UTM sont des ensembles de valeurs autorisées pour les paramètres UTM de vos Smart Links."
|
||||||
mautic.smartlinks.taxonomies.onboarding.copy="Utilisez le bouton Nouveau ci-dessus pour en créer une. Un Smart Link porte une taxonomie ; chaque valeur UTM qu’il porte est choisie parmi celles que la taxonomie autorise."
|
mt3s.smart_links.taxonomies.onboarding.copy="Utilisez le bouton Nouveau ci-dessus pour en créer une. Un Smart Link porte une taxonomie ; chaque valeur UTM qu’il porte est choisie parmi celles que la taxonomie autorise."
|
||||||
mautic.smartlinks.taxonomies.unpublished_choice="%name% (plus publiée)"
|
mt3s.smart_links.taxonomies.unpublished_choice="%name% (plus publiée)"
|
||||||
mautic.smartlinks.taxonomies.free_values.tooltip="Les valeurs autorisées de ce paramètre pour les liens utilisant cette taxonomie. Une valeur par ligne, éventuellement valeur;Libellé."
|
mt3s.smart_links.taxonomies.free_values.tooltip="Les valeurs autorisées de ce paramètre pour les liens utilisant cette taxonomie. Une valeur par ligne, éventuellement valeur;Libellé."
|
||||||
mautic.smartlinks.taxonomies.free_values.placeholder="une valeur par ligne"
|
mt3s.smart_links.taxonomies.free_values.placeholder="une valeur par ligne"
|
||||||
mautic.smartlinks.taxonomies.no_values.tooltip="Aucune valeur n’est encore configurée pour ce paramètre dans Paramètres Smart Links : demandez à l’administrateur d’en configurer."
|
mt3s.smart_links.taxonomies.no_values.tooltip="Aucune valeur n’est encore configurée pour ce paramètre dans Paramètres Smart Links : demandez à l’administrateur d’en configurer."
|
||||||
@@ -1,40 +1,40 @@
|
|||||||
; Messages de validation de Paramètres > Configuration > Paramètres UTM (domaine validators de Symfony).
|
; Messages de validation de Paramètres > Configuration > Paramètres UTM (domaine validators de Symfony).
|
||||||
mautic.smartlinks.config.error.key_required="Saisissez une clé pour le paramètre personnalisé."
|
mt3s.smart_links.config.error.key_required="Saisissez une clé pour le paramètre personnalisé."
|
||||||
mautic.smartlinks.config.error.key_invalid="La clé « %key% » n'est pas valide. Utilisez de 2 à 41 lettres minuscules, chiffres ou tirets bas, en commençant par une lettre."
|
mt3s.smart_links.config.error.key_invalid="La clé « %key% » n'est pas valide. Utilisez de 2 à 41 lettres minuscules, chiffres ou tirets bas, en commençant par une lettre."
|
||||||
mautic.smartlinks.config.error.key_reserved="La clé « %key% » est réservée. Les clés du catalogue, « ct », les clés commençant par « utm » et celles commençant par « mtc_ » ne peuvent pas être utilisées."
|
mt3s.smart_links.config.error.key_reserved="La clé « %key% » est réservée. Les clés du catalogue, « ct », les clés commençant par « utm » et celles commençant par « mtc_ » ne peuvent pas être utilisées."
|
||||||
mautic.smartlinks.config.error.key_duplicate="La clé « %key% » est utilisée par plusieurs paramètres personnalisés."
|
mt3s.smart_links.config.error.key_duplicate="La clé « %key% » est utilisée par plusieurs paramètres personnalisés."
|
||||||
mautic.smartlinks.config.error.mode_invalid="Ce mode n'est pas disponible pour ce paramètre."
|
mt3s.smart_links.config.error.mode_invalid="Ce mode n'est pas disponible pour ce paramètre."
|
||||||
mautic.smartlinks.config.error.separator_invalid="Choisissez un tiret, un tiret bas ou un point."
|
mt3s.smart_links.config.error.separator_invalid="Choisissez un tiret, un tiret bas ou un point."
|
||||||
mautic.smartlinks.config.error.label_required="Saisissez un libellé."
|
mt3s.smart_links.config.error.label_required="Saisissez un libellé."
|
||||||
mautic.smartlinks.config.error.label_length="Le libellé ne peut pas dépasser {{ limit }} caractères."
|
mt3s.smart_links.config.error.label_length="Le libellé ne peut pas dépasser {{ limit }} caractères."
|
||||||
mautic.smartlinks.config.error.label_invalid="Le libellé ne peut pas contenir le caractère %."
|
mt3s.smart_links.config.error.label_invalid="Le libellé ne peut pas contenir le caractère %."
|
||||||
mautic.smartlinks.config.error.value_required="Saisissez une valeur."
|
mt3s.smart_links.config.error.value_required="Saisissez une valeur."
|
||||||
mautic.smartlinks.config.error.value_length="La valeur ne peut pas dépasser {{ limit }} caractères."
|
mt3s.smart_links.config.error.value_length="La valeur ne peut pas dépasser {{ limit }} caractères."
|
||||||
mautic.smartlinks.config.error.value_invalid="Les valeurs ne peuvent contenir que des lettres minuscules, des chiffres, des tirets, des tirets bas et des points."
|
mt3s.smart_links.config.error.value_invalid="Les valeurs ne peuvent contenir que des lettres minuscules, des chiffres, des tirets, des tirets bas et des points."
|
||||||
mautic.smartlinks.config.error.value_duplicate="La valeur « %value% » apparaît plusieurs fois."
|
mt3s.smart_links.config.error.value_duplicate="La valeur « %value% » apparaît plusieurs fois."
|
||||||
mautic.smartlinks.config.error.values_required="Un paramètre activé en mode liste déroulante doit avoir au moins une valeur."
|
mt3s.smart_links.config.error.values_required="Un paramètre activé en mode liste déroulante doit avoir au moins une valeur."
|
||||||
mautic.smartlinks.config.error.default_multiple="Une seule valeur peut être la valeur par défaut."
|
mt3s.smart_links.config.error.default_multiple="Une seule valeur peut être la valeur par défaut."
|
||||||
|
|
||||||
; Section « UTM tags » des formulaires Email et Focus.
|
; Section « UTM tags » des formulaires Email et Focus.
|
||||||
mautic.smartlinks.form.error.not_in_taxonomy="Cette valeur ne fait pas partie de la taxonomie UTM. Choisissez une valeur de la liste."
|
mt3s.smart_links.form.error.not_in_taxonomy="Cette valeur ne fait pas partie de la taxonomie UTM. Choisissez une valeur de la liste."
|
||||||
|
|
||||||
; Formulaire Smart Link (menu principal > Smart Links).
|
; Formulaire Smart Link (menu principal > Smart Links).
|
||||||
mautic.smartlinks.smart_links.error.slug_required="Saisissez un slug."
|
mt3s.smart_links.smart_links.error.slug_required="Saisissez un slug."
|
||||||
mautic.smartlinks.smart_links.error.slug_length="Le slug ne peut pas dépasser {{ limit }} caractères."
|
mt3s.smart_links.smart_links.error.slug_length="Le slug ne peut pas dépasser {{ limit }} caractères."
|
||||||
mautic.smartlinks.smart_links.error.slug_characters="Le slug ne peut contenir que des lettres, des chiffres, des tirets, des tirets bas et des points."
|
mt3s.smart_links.smart_links.error.slug_characters="Le slug ne peut contenir que des lettres, des chiffres, des tirets, des tirets bas et des points."
|
||||||
mautic.smartlinks.smart_links.error.slug_taken="Un autre Smart Link utilise déjà le slug « %slug% ». Choisissez-en un autre."
|
mt3s.smart_links.smart_links.error.slug_taken="Un autre Smart Link utilise déjà le slug « %slug% ». Choisissez-en un autre."
|
||||||
mautic.smartlinks.smart_links.error.slug_immutable="Le slug d'un Smart Link ne peut pas être modifié. Supprimez-le et créez-en un nouveau."
|
mt3s.smart_links.smart_links.error.slug_immutable="Le slug d'un Smart Link ne peut pas être modifié. Supprimez-le et créez-en un nouveau."
|
||||||
mautic.smartlinks.smart_links.error.destination_required="Saisissez l'URL de destination de la redirection externe."
|
mt3s.smart_links.smart_links.error.destination_required="Saisissez l'URL de destination de la redirection externe."
|
||||||
mautic.smartlinks.smart_links.error.destination_required_mautic="Choisissez une landing page ou un formulaire autonome comme destination de la redirection Mautic."
|
mt3s.smart_links.smart_links.error.destination_required_mautic="Choisissez une landing page ou un formulaire autonome comme destination de la redirection Mautic."
|
||||||
mautic.smartlinks.smart_links.error.destination_invalid="L'URL de destination doit être une URL http(s) valide."
|
mt3s.smart_links.smart_links.error.destination_invalid="L'URL de destination doit être une URL http(s) valide."
|
||||||
mautic.smartlinks.smart_links.error.utm_value_invalid="Le paramètre « %key% » n'est pas activé, ou sa valeur n'est pas valide. Utilisez uniquement des lettres minuscules, des chiffres, des tirets, des tirets bas et des points."
|
mt3s.smart_links.smart_links.error.utm_value_invalid="Le paramètre « %key% » n'est pas activé, ou sa valeur n'est pas valide. Utilisez uniquement des lettres minuscules, des chiffres, des tirets, des tirets bas et des points."
|
||||||
mautic.smartlinks.smart_links.error.utm_value_not_allowed="La valeur « %value% » du paramètre « %key% » ne fait pas partie des valeurs autorisées."
|
mt3s.smart_links.smart_links.error.utm_value_not_allowed="La valeur « %value% » du paramètre « %key% » ne fait pas partie des valeurs autorisées."
|
||||||
|
|
||||||
; Formulaire de taxonomie UTM et valeurs des Smart Links pilotées par taxonomie.
|
; Formulaire de taxonomie UTM et valeurs des Smart Links pilotées par taxonomie.
|
||||||
mautic.smartlinks.taxonomies.error.name_required="Saisissez un nom."
|
mt3s.smart_links.taxonomies.error.name_required="Saisissez un nom."
|
||||||
mautic.smartlinks.taxonomies.error.name_length="Le nom ne peut pas dépasser {{ limit }} caractères."
|
mt3s.smart_links.taxonomies.error.name_length="Le nom ne peut pas dépasser {{ limit }} caractères."
|
||||||
mautic.smartlinks.taxonomies.error.name_taken="Une autre taxonomie UTM utilise déjà le nom %name%."
|
mt3s.smart_links.taxonomies.error.name_taken="Une autre taxonomie UTM utilise déjà le nom %name%."
|
||||||
mautic.smartlinks.taxonomies.error.name_characters="Le nom ne peut pas contenir les caractères %, { ou }."
|
mt3s.smart_links.taxonomies.error.name_characters="Le nom ne peut pas contenir les caractères %, { ou }."
|
||||||
mautic.smartlinks.taxonomies.error.value_invalid="La valeur %value% est invalide. Utilisez uniquement des lettres minuscules, des chiffres, des tirets, des tirets bas et des points."
|
mt3s.smart_links.taxonomies.error.value_invalid="La valeur %value% est invalide. Utilisez uniquement des lettres minuscules, des chiffres, des tirets, des tirets bas et des points."
|
||||||
mautic.smartlinks.smart_links.error.taxonomy_required="Choisissez une taxonomie UTM."
|
mt3s.smart_links.smart_links.error.taxonomy_required="Choisissez une taxonomie UTM."
|
||||||
mautic.smartlinks.smart_links.error.taxonomy_parameter_unknown="Le paramètre %key% ne fait pas partie de la taxonomie %name%."
|
mt3s.smart_links.smart_links.error.taxonomy_parameter_unknown="Le paramètre %key% ne fait pas partie de la taxonomie %name%."
|
||||||
@@ -5,11 +5,11 @@ declare(strict_types=1);
|
|||||||
namespace MauticPlugin\MT3SMarketingProgramBundle\Twig;
|
namespace MauticPlugin\MT3SMarketingProgramBundle\Twig;
|
||||||
|
|
||||||
use MauticPlugin\MT3SMarketingProgramBundle\Entity\Audience;
|
use MauticPlugin\MT3SMarketingProgramBundle\Entity\Audience;
|
||||||
use MauticPlugin\MT3SMarketingProgramBundle\Entity\AudienceType;
|
|
||||||
use MauticPlugin\MT3SMarketingProgramBundle\Entity\AudienceRepository;
|
use MauticPlugin\MT3SMarketingProgramBundle\Entity\AudienceRepository;
|
||||||
|
use MauticPlugin\MT3SMarketingProgramBundle\Entity\AudienceType;
|
||||||
|
use MauticPlugin\MT3SMarketingProgramBundle\Service\AudienceAttributes;
|
||||||
use MauticPlugin\MT3SMarketingProgramBundle\Service\CurrencyProvider;
|
use MauticPlugin\MT3SMarketingProgramBundle\Service\CurrencyProvider;
|
||||||
use MauticPlugin\MT3SMarketingProgramBundle\Service\ItemTypeProvider;
|
use MauticPlugin\MT3SMarketingProgramBundle\Service\ItemTypeProvider;
|
||||||
use MauticPlugin\MT3SMarketingProgramBundle\Service\AudienceAttributes;
|
|
||||||
use Twig\Extension\AbstractExtension;
|
use Twig\Extension\AbstractExtension;
|
||||||
use Twig\TwigFilter;
|
use Twig\TwigFilter;
|
||||||
use Twig\TwigFunction;
|
use Twig\TwigFunction;
|
||||||
@@ -39,7 +39,6 @@ class MT3SMarketingProgramExtension extends AbstractExtension
|
|||||||
public function __construct(
|
public function __construct(
|
||||||
private ItemTypeProvider $typeProvider,
|
private ItemTypeProvider $typeProvider,
|
||||||
private CurrencyProvider $currencyProvider,
|
private CurrencyProvider $currencyProvider,
|
||||||
private AudienceAttributes $audienceAttributes,
|
|
||||||
private AudienceRepository $audienceRepository,
|
private AudienceRepository $audienceRepository,
|
||||||
) {
|
) {
|
||||||
}
|
}
|
||||||
@@ -79,6 +78,8 @@ class MT3SMarketingProgramExtension extends AbstractExtension
|
|||||||
/**
|
/**
|
||||||
* The pictogram of an audience type. Accepts the enum itself (what the form's and entity's value
|
* The pictogram of an audience type. Accepts the enum itself (what the form's and entity's value
|
||||||
* holds) or its backing value ('persona'); null defaults to Persona, the form's default.
|
* holds) or its backing value ('persona'); null defaults to Persona, the form's default.
|
||||||
|
*
|
||||||
|
* @param AudienceType|string|null $value
|
||||||
*/
|
*/
|
||||||
private static function audienceTypeIcon($value): string
|
private static function audienceTypeIcon($value): string
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ use Symfony\Component\Validator\Constraint;
|
|||||||
*
|
*
|
||||||
* The start-before-end rule itself is EndDateAfterStartDate, shared by plans and tasks.
|
* The start-before-end rule itself is EndDateAfterStartDate, shared by plans and tasks.
|
||||||
*/
|
*/
|
||||||
#[\Symfony\Component\Validator\Attribute\HasNamedArguments]
|
|
||||||
class TaskDates extends Constraint
|
class TaskDates extends Constraint
|
||||||
{
|
{
|
||||||
public const MILESTONE_END_ENSLAVED = 'mt3s.marketing_program.task.milestone.end_enslaved';
|
public const MILESTONE_END_ENSLAVED = 'mt3s.marketing_program.task.milestone.end_enslaved';
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ class ValidTaskDependencyValidator extends ConstraintValidator
|
|||||||
*/
|
*/
|
||||||
public function validate($task, Constraint $constraint): void
|
public function validate($task, Constraint $constraint): void
|
||||||
{
|
{
|
||||||
if (!$task instanceof Task) {
|
if (!$task instanceof Task || !$constraint instanceof ValidTaskDependency) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -36,7 +36,7 @@ class ValidTaskDependencyValidator extends ConstraintValidator
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private function validateEdge(Task $task, TaskDependency $dependency, Constraint $constraint): void
|
private function validateEdge(Task $task, TaskDependency $dependency, ValidTaskDependency $constraint): void
|
||||||
{
|
{
|
||||||
$dependsOn = $dependency->getDependsOn();
|
$dependsOn = $dependency->getDependsOn();
|
||||||
|
|
||||||
|
|||||||
+10
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "mt3s/mautic-marketing-program-bundle",
|
"name": "mt3s/mautic-marketing-program-bundle",
|
||||||
"description": "Marketing Program for Mautic",
|
"description": "MT3S Marketing for Mautic: programs, tasks, audiences, and smart links with their UTM taxonomies.",
|
||||||
"type": "mautic-plugin",
|
"type": "mautic-plugin",
|
||||||
"license": "GPL-3.0-or-later",
|
"license": "GPL-3.0-or-later",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
@@ -12,6 +12,15 @@
|
|||||||
"php": ">=8.2",
|
"php": ">=8.2",
|
||||||
"mautic/core-lib": "^7.0"
|
"mautic/core-lib": "^7.0"
|
||||||
},
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"friendsofphp/php-cs-fixer": "^3.0",
|
||||||
|
"phpstan/phpstan": "^2.0"
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"cs-check": "php-cs-fixer fix --dry-run --diff --config=.php-cs-fixer.dist.php",
|
||||||
|
"cs-fix": "php-cs-fixer fix --config=.php-cs-fixer.dist.php",
|
||||||
|
"phpstan": "phpstan analyse --no-progress -c phpstan.neon"
|
||||||
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"MauticPlugin\\MT3SMarketingProgramBundle\\": ""
|
"MauticPlugin\\MT3SMarketingProgramBundle\\": ""
|
||||||
|
|||||||
@@ -0,0 +1,127 @@
|
|||||||
|
parameters:
|
||||||
|
ignoreErrors:
|
||||||
|
-
|
||||||
|
message: '#^Property MauticPlugin\\MT3SMarketingProgramBundle\\Entity\\Audience\:\:\$id \(int\|null\) is never assigned int so it can be removed from the property type\.$#'
|
||||||
|
identifier: property.unusedType
|
||||||
|
count: 1
|
||||||
|
path: Entity/Audience.php
|
||||||
|
|
||||||
|
-
|
||||||
|
message: '#^Property MauticPlugin\\MT3SMarketingProgramBundle\\Entity\\Program\:\:\$id \(int\|null\) is never assigned int so it can be removed from the property type\.$#'
|
||||||
|
identifier: property.unusedType
|
||||||
|
count: 1
|
||||||
|
path: Entity/Program.php
|
||||||
|
|
||||||
|
-
|
||||||
|
message: '#^Property MauticPlugin\\MT3SMarketingProgramBundle\\Entity\\ProgramAllocationItem\:\:\$id \(int\|null\) is never assigned int so it can be removed from the property type\.$#'
|
||||||
|
identifier: property.unusedType
|
||||||
|
count: 1
|
||||||
|
path: Entity/ProgramAllocationItem.php
|
||||||
|
|
||||||
|
-
|
||||||
|
message: '#^Property MauticPlugin\\MT3SMarketingProgramBundle\\Entity\\ProgramAudience\:\:\$id \(int\|null\) is never assigned int so it can be removed from the property type\.$#'
|
||||||
|
identifier: property.unusedType
|
||||||
|
count: 1
|
||||||
|
path: Entity/ProgramAudience.php
|
||||||
|
|
||||||
|
-
|
||||||
|
message: '#^Property MauticPlugin\\MT3SMarketingProgramBundle\\Entity\\ProgramDescriptionItem\:\:\$id \(int\|null\) is never assigned int so it can be removed from the property type\.$#'
|
||||||
|
identifier: property.unusedType
|
||||||
|
count: 1
|
||||||
|
path: Entity/ProgramDescriptionItem.php
|
||||||
|
|
||||||
|
-
|
||||||
|
message: '#^Property MauticPlugin\\MT3SMarketingProgramBundle\\Entity\\ProgramObjective\:\:\$id \(int\|null\) is never assigned int so it can be removed from the property type\.$#'
|
||||||
|
identifier: property.unusedType
|
||||||
|
count: 1
|
||||||
|
path: Entity/ProgramObjective.php
|
||||||
|
|
||||||
|
-
|
||||||
|
message: '#^Property MauticPlugin\\MT3SMarketingProgramBundle\\Entity\\ProgramStakeholder\:\:\$id \(int\|null\) is never assigned int so it can be removed from the property type\.$#'
|
||||||
|
identifier: property.unusedType
|
||||||
|
count: 1
|
||||||
|
path: Entity/ProgramStakeholder.php
|
||||||
|
|
||||||
|
-
|
||||||
|
message: '#^Property MauticPlugin\\MT3SMarketingProgramBundle\\Entity\\SmartLink\:\:\$id \(int\|null\) is never assigned int so it can be removed from the property type\.$#'
|
||||||
|
identifier: property.unusedType
|
||||||
|
count: 1
|
||||||
|
path: Entity/SmartLink.php
|
||||||
|
|
||||||
|
-
|
||||||
|
message: '#^Property MauticPlugin\\MT3SMarketingProgramBundle\\Entity\\SmartLinkHit\:\:\$id \(int\|null\) is never assigned int so it can be removed from the property type\.$#'
|
||||||
|
identifier: property.unusedType
|
||||||
|
count: 1
|
||||||
|
path: Entity/SmartLinkHit.php
|
||||||
|
|
||||||
|
-
|
||||||
|
message: '#^Property MauticPlugin\\MT3SMarketingProgramBundle\\Entity\\Stakeholder\:\:\$id \(int\|null\) is never assigned int so it can be removed from the property type\.$#'
|
||||||
|
identifier: property.unusedType
|
||||||
|
count: 1
|
||||||
|
path: Entity/Stakeholder.php
|
||||||
|
|
||||||
|
-
|
||||||
|
message: '#^Property MauticPlugin\\MT3SMarketingProgramBundle\\Entity\\Task\:\:\$id \(int\|null\) is never assigned int so it can be removed from the property type\.$#'
|
||||||
|
identifier: property.unusedType
|
||||||
|
count: 1
|
||||||
|
path: Entity/Task.php
|
||||||
|
|
||||||
|
-
|
||||||
|
message: '#^Property MauticPlugin\\MT3SMarketingProgramBundle\\Entity\\TaskDependency\:\:\$id \(int\|null\) is never assigned int so it can be removed from the property type\.$#'
|
||||||
|
identifier: property.unusedType
|
||||||
|
count: 1
|
||||||
|
path: Entity/TaskDependency.php
|
||||||
|
|
||||||
|
-
|
||||||
|
message: '#^Property MauticPlugin\\MT3SMarketingProgramBundle\\Entity\\TaskRaci\:\:\$id \(int\|null\) is never assigned int so it can be removed from the property type\.$#'
|
||||||
|
identifier: property.unusedType
|
||||||
|
count: 1
|
||||||
|
path: Entity/TaskRaci.php
|
||||||
|
|
||||||
|
-
|
||||||
|
message: '#^Property MauticPlugin\\MT3SMarketingProgramBundle\\Entity\\UtmTaxonomy\:\:\$id \(int\|null\) is never assigned int so it can be removed from the property type\.$#'
|
||||||
|
identifier: property.unusedType
|
||||||
|
count: 1
|
||||||
|
path: Entity/UtmTaxonomy.php
|
||||||
|
|
||||||
|
-
|
||||||
|
message: '#^Method MauticPlugin\\MT3SMarketingProgramBundle\\Migrations\\Version_0_11_0\:\:hasForeignKeys\(\) is unused\.$#'
|
||||||
|
identifier: method.unused
|
||||||
|
count: 1
|
||||||
|
path: Migrations/Version_0_11_0.php
|
||||||
|
|
||||||
|
-
|
||||||
|
message: '#^Negated boolean expression is always true\.$#'
|
||||||
|
identifier: booleanNot.alwaysTrue
|
||||||
|
count: 1
|
||||||
|
path: Migrations/Version_0_11_0.php
|
||||||
|
|
||||||
|
-
|
||||||
|
message: '#^Class MauticPlugin\\MT3SMarketingProgramBundle\\Migrations\\InitiativeStakeholder not found\.$#'
|
||||||
|
identifier: class.notFound
|
||||||
|
count: 1
|
||||||
|
path: Migrations/Version_0_12_0.php
|
||||||
|
|
||||||
|
-
|
||||||
|
message: '#^Class MauticPlugin\\MT3SMarketingProgramBundle\\Migrations\\InitiativeDescriptionItem not found\.$#'
|
||||||
|
identifier: class.notFound
|
||||||
|
count: 1
|
||||||
|
path: Migrations/Version_0_6_0.php
|
||||||
|
|
||||||
|
-
|
||||||
|
message: '#^Class MauticPlugin\\MT3SMarketingProgramBundle\\Migrations\\InitiativeAllocationItem not found\.$#'
|
||||||
|
identifier: class.notFound
|
||||||
|
count: 1
|
||||||
|
path: Migrations/Version_0_7_0.php
|
||||||
|
|
||||||
|
-
|
||||||
|
message: '#^Return type \(MauticPlugin\\MT3SMarketingProgramBundle\\Entity\\AudienceRepository\) of method MauticPlugin\\MT3SMarketingProgramBundle\\Model\\AudienceModel\:\:getRepository\(\) should be compatible with return type \(Mautic\\CoreBundle\\Entity\\CommonRepository\<object\>\) of method Mautic\\CoreBundle\\Model\\AbstractCommonModel\<object\>\:\:getRepository\(\)$#'
|
||||||
|
identifier: method.childReturnType
|
||||||
|
count: 1
|
||||||
|
path: Model/AudienceModel.php
|
||||||
|
|
||||||
|
-
|
||||||
|
message: '#^Return type \(MauticPlugin\\MT3SMarketingProgramBundle\\Entity\\StakeholderRepository\) of method MauticPlugin\\MT3SMarketingProgramBundle\\Model\\StakeholderModel\:\:getRepository\(\) should be compatible with return type \(Mautic\\CoreBundle\\Entity\\CommonRepository\<object\>\) of method Mautic\\CoreBundle\\Model\\AbstractCommonModel\<object\>\:\:getRepository\(\)$#'
|
||||||
|
identifier: method.childReturnType
|
||||||
|
count: 1
|
||||||
|
path: Model/StakeholderModel.php
|
||||||
@@ -0,0 +1,62 @@
|
|||||||
|
# PHPStan configuration of the plugin, modeled on Mautic core's phpstan.neon.
|
||||||
|
#
|
||||||
|
# The analysis needs the autoloader of a Mautic installation: the bootstrap file
|
||||||
|
# (Tests/bootstrap.php) walks up from the plugin directory until it finds
|
||||||
|
# vendor/autoload.php. Run it either from a Mautic installation that has this
|
||||||
|
# plugin in docroot/plugins/, or after a `composer install` in the plugin
|
||||||
|
# directory (which pulls mautic/core-lib and the require-dev tools):
|
||||||
|
#
|
||||||
|
# vendor/bin/phpstan analyse --no-progress -c phpstan.neon
|
||||||
|
includes:
|
||||||
|
# The documented debt found when the tooling was introduced (see readme.md, Coding
|
||||||
|
# standards): Doctrine-assigned entity ids, historical migrations referencing the
|
||||||
|
# pre-rename entity classes, and core's generic AbstractCommonModel::getRepository()
|
||||||
|
# annotations. New errors still fail the analysis; regenerate the baseline after
|
||||||
|
# fixing entries with `phpstan analyse --generate-baseline -c phpstan.neon`.
|
||||||
|
- phpstan-baseline.neon
|
||||||
|
|
||||||
|
parameters:
|
||||||
|
level: 6
|
||||||
|
reportUnmatchedIgnoredErrors: false
|
||||||
|
treatPhpDocTypesAsCertain: false
|
||||||
|
|
||||||
|
paths:
|
||||||
|
- Catalog
|
||||||
|
- Command
|
||||||
|
- Config
|
||||||
|
- Controller
|
||||||
|
- DependencyInjection
|
||||||
|
- Entity
|
||||||
|
- Event
|
||||||
|
- EventListener
|
||||||
|
- Form
|
||||||
|
- Integration
|
||||||
|
- Migrations
|
||||||
|
- Model
|
||||||
|
- Security
|
||||||
|
- Service
|
||||||
|
- Tests
|
||||||
|
- Twig
|
||||||
|
- Validator
|
||||||
|
- MT3SMarketingProgramBundle.php
|
||||||
|
|
||||||
|
excludePaths:
|
||||||
|
- Resources
|
||||||
|
- Translations
|
||||||
|
- Assets
|
||||||
|
|
||||||
|
# The same pragmatic ignores Mautic core keeps in its own phpstan.neon.
|
||||||
|
ignoreErrors:
|
||||||
|
- identifier: missingType.generics
|
||||||
|
# not all IDEs are as smart as PHPSTAN and need the type hint
|
||||||
|
- identifier: function.alreadyNarrowedType
|
||||||
|
- identifier: instanceof.alwaysTrue
|
||||||
|
- '/Variable \$\w+ might not be defined\./'
|
||||||
|
# test mocks
|
||||||
|
- '#Parameter (.*?) class (.*?) expects (.*?)PHPUnit\\Framework\\MockObject\\MockObject given#'
|
||||||
|
- '#is not subtype of native type PHPUnit\\Framework\\MockObject\\MockObject#'
|
||||||
|
- '#Call to an undefined method PHPUnit\\Framework\\MockObject\\MockObject#'
|
||||||
|
- '#expects (.*?) PHPUnit\\Framework\\MockObject\\MockObject given#'
|
||||||
|
|
||||||
|
bootstrapFiles:
|
||||||
|
- Tests/bootstrap.php
|
||||||
+2
-2
@@ -1,12 +1,12 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!-- Run from a Mautic installation: vendor/bin/phpunit -c docroot/plugins/UtmManagerBundle/phpunit.xml.dist -->
|
<!-- Run from a Mautic installation: vendor/bin/phpunit -c docroot/plugins/MT3SMarketingProgramBundle/phpunit.xml.dist -->
|
||||||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/11.5/phpunit.xsd"
|
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/11.5/phpunit.xsd"
|
||||||
bootstrap="Tests/bootstrap.php"
|
bootstrap="Tests/bootstrap.php"
|
||||||
colors="true"
|
colors="true"
|
||||||
failOnWarning="true">
|
failOnWarning="true">
|
||||||
<testsuites>
|
<testsuites>
|
||||||
<testsuite name="UtmManagerBundle">
|
<testsuite name="MT3SMarketingProgramBundle">
|
||||||
<directory>Tests</directory>
|
<directory>Tests</directory>
|
||||||
</testsuite>
|
</testsuite>
|
||||||
</testsuites>
|
</testsuites>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Mautic MT3S Marketing plugin
|
# Mautic MT3S Marketing Program plugin
|
||||||
|
|
||||||
A custom Mautic 7 plugin (`MT3SMarketingProgramBundle`) by MT3 Solutions with two separate domains: **Marketing Programs** — programs with a name, status, owner, dates, budget and category, with their mt3s_mp_programs — and **Smart Links** — short links (`/l/{slug}`) that tag the click with the UTM parameters of a UTM taxonomy before redirecting. The two domains share one bundle, one permission base (`mt3smarketingprogram:*`), one Plugins page entry and one config page, but keep separate menus, tables and code.
|
A custom Mautic 7 plugin (`MT3SMarketingProgramBundle`) by MT3 Solutions with two separate domains: **Marketing Programs** — programs with a name, status, owner, dates, budget and category, with their mt3s_mp_programs — and **Smart Links** — short links (`/l/{slug}`) that tag the click with the UTM parameters of a UTM taxonomy before redirecting. The two domains share one bundle, one permission base (`mt3smarketingprogram:*`), one Plugins page entry and one config page, but keep separate menus, tables and code.
|
||||||
|
|
||||||
@@ -34,13 +34,13 @@ Run the plugin in the shared Docker environment, [mautic-dev-env](https://git.mt
|
|||||||
|
|
||||||
```
|
```
|
||||||
~/projects/
|
~/projects/
|
||||||
mautic-plugin-plan/
|
mautic-marketing-program-bundle/
|
||||||
```
|
```
|
||||||
|
|
||||||
In the dev environment's `.env`, point it at this plugin:
|
In the dev environment's `.env`, point it at this plugin:
|
||||||
|
|
||||||
```
|
```
|
||||||
PLUGIN_PLAN_PATH=../mautic-plugin-plan
|
PLUGIN_PATH=../mautic-marketing-program-bundle
|
||||||
```
|
```
|
||||||
|
|
||||||
The dev environment mounts it as `docroot/plugins/MT3SMarketingProgramBundle`.
|
The dev environment mounts it as `docroot/plugins/MT3SMarketingProgramBundle`.
|
||||||
@@ -56,6 +56,29 @@ cd ../mautic-dev-env
|
|||||||
|
|
||||||
For the complete list of commands, see the dev environment's README.
|
For the complete list of commands, see the dev environment's README.
|
||||||
|
|
||||||
|
## Coding standards
|
||||||
|
|
||||||
|
The plugin runs the same code quality tools as Mautic core, configured in the repository root:
|
||||||
|
|
||||||
|
- **PHP-CS-Fixer** (`.php-cs-fixer.dist.php`): core's own ruleset — `@Symfony` plus its tweaks (aligned `=>`/`=` operators, ordered imports, short arrays, no unused imports, no header comments) minus the custom fixer of the `mautic/coding-standards` package, which a standalone plugin repository cannot require.
|
||||||
|
- **PHPStan** (`phpstan.neon`): level 6, with the same pragmatic ignores core keeps, and the plugin's `Tests/bootstrap.php` as the bootstrap so the analysis resolves the classes of the Mautic installation. The documented pre-existing debt (Doctrine-assigned entity ids, historical migrations referencing the pre-rename entity classes, core's generic `AbstractCommonModel::getRepository()` annotations) is recorded in `phpstan-baseline.neon`; new errors still fail the analysis. Regenerate after fixing entries: `vendor/bin/phpstan analyse --generate-baseline -c phpstan.neon`.
|
||||||
|
- **GitLab CI** (`.gitlab-ci.yml`): every push runs `composer cs-check` and `composer phpstan`. The PHPUnit suite is not run in CI: it needs a full Mautic installation (its bootstrap walks up to the nearest `vendor/autoload.php`).
|
||||||
|
|
||||||
|
The tools are `require-dev` dependencies (`composer install` in the plugin directory pulls `mautic/core-lib` and the tools, so the analysis sees the real Mautic signatures):
|
||||||
|
|
||||||
|
```bash
|
||||||
|
composer install # once, in the plugin directory
|
||||||
|
composer cs-check # dry run with the diff
|
||||||
|
composer cs-fix # fix in place
|
||||||
|
composer phpstan # PHPStan level 6
|
||||||
|
```
|
||||||
|
|
||||||
|
From the dev environment's running Mautic container instead (no local `composer install` needed):
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker compose exec mautic_web php vendor/bin/phpunit -c docroot/plugins/MT3SMarketingProgramBundle/phpunit.xml.dist
|
||||||
|
```
|
||||||
|
|
||||||
## Plugin structure
|
## Plugin structure
|
||||||
|
|
||||||
The plugin uses the IntegrationsBundle conventions:
|
The plugin uses the IntegrationsBundle conventions:
|
||||||
@@ -80,7 +103,7 @@ The plugin uses the IntegrationsBundle conventions:
|
|||||||
- `Controller/SmartLinkController.php` and `Resources/views/SmartLink/`: the Smart Links list and form (**Smart Links > Smart Links**, `/s/smart-links`), built on core's `AbstractStandardFormController`.
|
- `Controller/SmartLinkController.php` and `Resources/views/SmartLink/`: the Smart Links list and form (**Smart Links > Smart Links**, `/s/smart-links`), built on core's `AbstractStandardFormController`.
|
||||||
- `Controller/UtmTaxonomyController.php` and `Resources/views/UtmTaxonomy/`: the UTM taxonomies list and form (**Smart Links > UTM Taxonomies**, `/s/utm-taxonomies`). Replaced the placeholder page of 0.17.0 in 0.18.0. `Model/UtmTaxonomyModel.php`, `Model/SmartLinkModel.php`, `Entity/SmartLink.php`, `Entity/SmartLinkHit.php`, `Entity/UtmTaxonomy.php` (tables `smart_links`, `smart_link_hits`, `utm_taxonomies` — unchanged from the standalone plugin), `Catalog/` (redirect codes 301/302/307/308, redirect types `external`/`mautic`, the UTM parameter catalog and its modes), `Form/` (the link and taxonomy forms, the per-taxonomy UTM fields via `Form/UtmFieldsApplicator.php`, the validators) and `Controller/PublicController.php` (the public `/l/{slug}`) make up the Smart Links domain.
|
- `Controller/UtmTaxonomyController.php` and `Resources/views/UtmTaxonomy/`: the UTM taxonomies list and form (**Smart Links > UTM Taxonomies**, `/s/utm-taxonomies`). Replaced the placeholder page of 0.17.0 in 0.18.0. `Model/UtmTaxonomyModel.php`, `Model/SmartLinkModel.php`, `Entity/SmartLink.php`, `Entity/SmartLinkHit.php`, `Entity/UtmTaxonomy.php` (tables `smart_links`, `smart_link_hits`, `utm_taxonomies` — unchanged from the standalone plugin), `Catalog/` (redirect codes 301/302/307/308, redirect types `external`/`mautic`, the UTM parameter catalog and its modes), `Form/` (the link and taxonomy forms, the per-taxonomy UTM fields via `Form/UtmFieldsApplicator.php`, the validators) and `Controller/PublicController.php` (the public `/l/{slug}`) make up the Smart Links domain.
|
||||||
- `EventListener/SmartLinksConfigSubscriber.php`: adds the **Smart Links Settings** tab to Settings > Configuration (`Form/Type/SmartLinksConfigType.php`, `Form/Type/SmartlinksSettingsType.php`, `Integration/Support/ConfigSupport.php`), next to the plugin's **Program Settings** tab; `Service/UtmConfigurationProvider.php` and `Service/UtmConfigurationNormalizer.php` read those parameters, `Service/SmartLinkShortUrlBuilder.php` builds the redirect URLs.
|
- `EventListener/SmartLinksConfigSubscriber.php`: adds the **Smart Links Settings** tab to Settings > Configuration (`Form/Type/SmartLinksConfigType.php`, `Form/Type/SmartlinksSettingsType.php`, `Integration/Support/ConfigSupport.php`), next to the plugin's **Program Settings** tab; `Service/UtmConfigurationProvider.php` and `Service/UtmConfigurationNormalizer.php` read those parameters, `Service/SmartLinkShortUrlBuilder.php` builds the redirect URLs.
|
||||||
- `Assets/js/mt3s-mp-smartlinks.js`: the Smart Links form script (started by `Mautic.smartlinksSmartLinkOnLoad()` when a page's `mauticContent` is `smartlinksSmartLink`).
|
- `Assets/js/mt3s-mp-smartlinks.js`: the Smart Links form script (started by `Mautic.mt3sMpSmartLinkOnLoad()` when a page's `mauticContent` is `mt3sMpSmartLink`).
|
||||||
- `Tests/Unit/` and `phpunit.xml.dist`: the plugin's unit test suite (mostly covering the Smart Links domain: the catalog, the entities, the form type, the fields applicator, the validators, the models and the configuration provider).
|
- `Tests/Unit/` and `phpunit.xml.dist`: the plugin's unit test suite (mostly covering the Smart Links domain: the catalog, the entities, the form type, the fields applicator, the validators, the models and the configuration provider).
|
||||||
- `Controller/ItemTypesController.php` and `Resources/views/ItemTypes/form.html.twig`: the Item types page (**Marketing Programs > Item types**). The type lists that used to be sections of **Settings > Configuration > Marketing Program Settings** (insights, allocation, objective, task, stakeholder types and the audience decision roles and tones) are edited here. `Form/Type/ItemTypesType.php` builds the lists, `Service/ItemTypeInUseGuard.php` refuses to remove a type that items still use, and the page saves through core's `Configurator` exactly like the Settings pages do: merge into `config/local.php`, write, refresh the config cache. **Settings > Configuration > Marketing Program Settings** keeps only the plugin's general settings: the currency, the stakeholder phone region and the audience attribute toggles.
|
- `Controller/ItemTypesController.php` and `Resources/views/ItemTypes/form.html.twig`: the Item types page (**Marketing Programs > Item types**). The type lists that used to be sections of **Settings > Configuration > Marketing Program Settings** (insights, allocation, objective, task, stakeholder types and the audience decision roles and tones) are edited here. `Form/Type/ItemTypesType.php` builds the lists, `Service/ItemTypeInUseGuard.php` refuses to remove a type that items still use, and the page saves through core's `Configurator` exactly like the Settings pages do: merge into `config/local.php`, write, refresh the config cache. **Settings > Configuration > Marketing Program Settings** keeps only the plugin's general settings: the currency, the stakeholder phone region and the audience attribute toggles.
|
||||||
- `Assets/js/mt3s-mp-program.js`: on the form, the objectives editor (add, remove, drag-and-drop ordering), and after a failed save, marking the tabs that contain errors with an icon and opening the first one. Started by `Mautic.mt3sMpProgramOnLoad()`.
|
- `Assets/js/mt3s-mp-program.js`: on the form, the objectives editor (add, remove, drag-and-drop ordering), and after a failed save, marking the tabs that contain errors with an icon and opening the first one. Started by `Mautic.mt3sMpProgramOnLoad()`.
|
||||||
@@ -127,9 +150,9 @@ Permission keys:
|
|||||||
- `Entity/Audience.php`, `AudienceType.php`, `AudiencePriority.php` and `AudienceRepository.php`: the audiences of the global directory (table `mt3s_mp_program_audiences`, `plan_targets` before 0.15.0): name, a fixed type (persona, ICP, broad audience, lifecycle cohort, partner/influencer — each with its own pictogram), a tagline, the Mautic segments that hold this audience's contacts (see below), and the persona attributes the admin switched on (**Settings > Configuration > Marketing Program Settings**, one toggle per attribute, so a b2b install and a b2c install define their personas differently): profile criteria, motivations, barriers, frustrations (formerly pain points), triggers, a decision-making role (a value of the admin-edited list `mt3s_marketing_program_audience_decision_roles`), a preferred tone (checkboxes of the admin-edited list `mt3s_marketing_program_audience_tones`), preferred channels (checkboxes: email, SMS, web, social organic, paid social, paid search, events/webinar, outbound sales, partners), any number of Mautic stages (join table `mt3s_mp_program_audiences_stages`) and an estimated size. `Service/AudienceAttributes.php` reads the toggles.
|
- `Entity/Audience.php`, `AudienceType.php`, `AudiencePriority.php` and `AudienceRepository.php`: the audiences of the global directory (table `mt3s_mp_program_audiences`, `plan_targets` before 0.15.0): name, a fixed type (persona, ICP, broad audience, lifecycle cohort, partner/influencer — each with its own pictogram), a tagline, the Mautic segments that hold this audience's contacts (see below), and the persona attributes the admin switched on (**Settings > Configuration > Marketing Program Settings**, one toggle per attribute, so a b2b install and a b2c install define their personas differently): profile criteria, motivations, barriers, frustrations (formerly pain points), triggers, a decision-making role (a value of the admin-edited list `mt3s_marketing_program_audience_decision_roles`), a preferred tone (checkboxes of the admin-edited list `mt3s_marketing_program_audience_tones`), preferred channels (checkboxes: email, SMS, web, social organic, paid social, paid search, events/webinar, outbound sales, partners), any number of Mautic stages (join table `mt3s_mp_program_audiences_stages`) and an estimated size. `Service/AudienceAttributes.php` reads the toggles.
|
||||||
- **Segments**: each audience can have any number of Mautic segments (LeadBundle lists), purely informational — nothing requires one, and nothing in the program depends on them. They are stored in the join table `mt3s_mp_program_audiences_segments` (audience_id, leadlist_id), picked in the audience form (published segments only), shown in the directory's Segments column (each with its count of contacts, from `lead_lists_leads` where `manually_removed = 0`) and on the detail page. `AudienceRepository::getSegmentContactCountsForAudiences()` computes the counts for the whole page in one query.
|
- **Segments**: each audience can have any number of Mautic segments (LeadBundle lists), purely informational — nothing requires one, and nothing in the program depends on them. They are stored in the join table `mt3s_mp_program_audiences_segments` (audience_id, leadlist_id), picked in the audience form (published segments only), shown in the directory's Segments column (each with its count of contacts, from `lead_lists_leads` where `manually_removed = 0`) and on the detail page. `AudienceRepository::getSegmentContactCountsForAudiences()` computes the counts for the whole page in one query.
|
||||||
- `Entity/ProgramAudience.php`: the link between a program and an audience (table `mt3s_mp_program_audiences_program`), with the audience's priority in that program (primary, secondary, exclusion), a program-specific value proposition and a position. Deleting the program or the audience deletes the link (ON DELETE CASCADE both sides).
|
- `Entity/ProgramAudience.php`: the link between a program and an audience (table `mt3s_mp_program_audiences_program`), with the audience's priority in that program (primary, secondary, exclusion), a program-specific value proposition and a position. Deleting the program or the audience deletes the link (ON DELETE CASCADE both sides).
|
||||||
- `Model/AudienceModel.php`: the model, available as `mt3s.marketing_program.model.audience` or with `getModel('mt3smp.audience')`.
|
- `Model/AudienceModel.php`: the model, available as `mautic.mt3smarketingprogram.model.audience` or with `getModel('mt3smarketingprogram.audience')`.
|
||||||
- `Controller/AudienceController.php` and `Resources/views/Audience/`: the directory (**Marketing Programs > Audiences**), with the columns ID, Pictogram, Type, Name (with its tagline), Segments (each with its contact count), Estimated size, Active, and **Assigned mt3s_mp_programs** — the mt3s_mp_programs the audience is linked to, each with its priority in that program. The detail page lists the segments, the persona attributes that are filled in, and those mt3s_mp_programs.
|
- `Controller/AudienceController.php` and `Resources/views/Audience/`: the directory (**Marketing Programs > Audiences**), with the columns ID, Pictogram, Type, Name (with its tagline), Segments (each with its contact count), Estimated size, Active, and **Assigned mt3s_mp_programs** — the mt3s_mp_programs the audience is linked to, each with its priority in that program. The detail page lists the segments, the persona attributes that are filled in, and those mt3s_mp_programs.
|
||||||
- `Model/ProgramModel.php`: the model, available as `mt3s.marketing_program.model.program` or with `getModel('mt3smp.program')`. A new program from `getEntity()` has the current user as owner.
|
- `Model/ProgramModel.php`: the model, available as `mautic.mt3smarketingprogram.model.program` or with `getModel('mt3smarketingprogram.program')`. A new program from `getEntity()` has the current user as owner.
|
||||||
- `Entity/ProgramDescriptionItem.php` and `ProgramDescriptionItemRepository.php`: a program's description items (table `mt3s_mp_program_description_items`): type, description and position. They make up the **Insights** tab and replace the former `description` field.
|
- `Entity/ProgramDescriptionItem.php` and `ProgramDescriptionItemRepository.php`: a program's description items (table `mt3s_mp_program_description_items`): type, description and position. They make up the **Insights** tab and replace the former `description` field.
|
||||||
- `Form/Type/ProgramType.php`, `ProgramObjectiveType.php` and `ProgramDescriptionItemType.php`: the create and edit form, with the objectives and the description items as collections
|
- `Form/Type/ProgramType.php`, `ProgramObjectiveType.php` and `ProgramDescriptionItemType.php`: the create and edit form, with the objectives and the description items as collections
|
||||||
- `Validator/Constraints/EndDateAfterStartDate.php`: the end date must be on or after the start date, when both are set. Used by mt3s_mp_programs and tasks, through `Entity/DateRangeInterface.php`.
|
- `Validator/Constraints/EndDateAfterStartDate.php`: the end date must be on or after the start date, when both are set. Used by mt3s_mp_programs and tasks, through `Entity/DateRangeInterface.php`.
|
||||||
@@ -173,7 +196,7 @@ Behaviour to know about:
|
|||||||
|
|
||||||
- `Entity/Stakeholder.php` and `StakeholderRepository.php`: a stakeholder (table `mt3s_mp_program_stakeholders`), the global directory of the people, companies and teams involved in the mt3s_mp_programs: name, email (validated, indexed for duplicate detection), phone, role, type and the active flag (`isPublished`). Independent of mt3s_mp_programs.
|
- `Entity/Stakeholder.php` and `StakeholderRepository.php`: a stakeholder (table `mt3s_mp_program_stakeholders`), the global directory of the people, companies and teams involved in the mt3s_mp_programs: name, email (validated, indexed for duplicate detection), phone, role, type and the active flag (`isPublished`). Independent of mt3s_mp_programs.
|
||||||
- `Entity/ProgramStakeholder.php`: the link between a program and a stakeholder (table `mt3s_mp_program_stakeholders_program`), with the stakeholder's role in that program (free text, column `role_in_program`) and a position. Deleting the program or the stakeholder deletes the link (ON DELETE CASCADE both sides).
|
- `Entity/ProgramStakeholder.php`: the link between a program and a stakeholder (table `mt3s_mp_program_stakeholders_program`), with the stakeholder's role in that program (free text, column `role_in_program`) and a position. Deleting the program or the stakeholder deletes the link (ON DELETE CASCADE both sides).
|
||||||
- `Model/StakeholderModel.php`: the model, available as `mt3s.marketing_program.model.stakeholder` or with `getModel('mt3smp.stakeholder')`. On save, the phone number is normalized to E.164 using the default region from **Settings > Configuration > Marketing Program Settings** (parameter `mt3s_marketing_program_stakeholder_phone_region`, `FR` by default); a number that doesn't parse is kept exactly as typed, and the save is never blocked.
|
- `Model/StakeholderModel.php`: the model, available as `mautic.mt3smarketingprogram.model.stakeholder` or with `getModel('mt3smarketingprogram.stakeholder')`. On save, the phone number is normalized to E.164 using the default region from **Settings > Configuration > Marketing Program Settings** (parameter `mt3s_marketing_program_stakeholder_phone_region`, `FR` by default); a number that doesn't parse is kept exactly as typed, and the save is never blocked.
|
||||||
- `Controller/StakeholderController.php` and `Resources/views/Stakeholder/`: the directory (**Marketing Programs > Stakeholders**), with the columns ID, Pictogram, Type, Name, Role, Email (mailto link), Phone (tel link), Active, and **Assigned mt3s_mp_programs** — the mt3s_mp_programs the stakeholder is linked to, each with its role in that program. The detail page lists those mt3s_mp_programs too.
|
- `Controller/StakeholderController.php` and `Resources/views/Stakeholder/`: the directory (**Marketing Programs > Stakeholders**), with the columns ID, Pictogram, Type, Name, Role, Email (mailto link), Phone (tel link), Active, and **Assigned mt3s_mp_programs** — the mt3s_mp_programs the stakeholder is linked to, each with its role in that program. The detail page lists those mt3s_mp_programs too.
|
||||||
- The stakeholder's type is the key of a stakeholder type set up in **Settings > Configuration > Marketing Program Settings** (parameter `mt3s_marketing_program_stakeholder_types`), same pattern as the other item types, pictogram included.
|
- The stakeholder's type is the key of a stakeholder type set up in **Settings > Configuration > Marketing Program Settings** (parameter `mt3s_marketing_program_stakeholder_types`), same pattern as the other item types, pictogram included.
|
||||||
- A program's **Stakeholders tab** links the directory to the program: each row picks an active stakeholder and gives its role in the program. The tab shows the harmonized table (pictogram, Type, Name, Role in the program, Role, Email, Phone, Active). Unpublished stakeholders are not offered in the picker, but keep their links.
|
- A program's **Stakeholders tab** links the directory to the program: each row picks an active stakeholder and gives its role in the program. The tab shows the harmonized table (pictogram, Type, Name, Role in the program, Role, Email, Phone, Active). Unpublished stakeholders are not offered in the picker, but keep their links.
|
||||||
@@ -182,7 +205,7 @@ Behaviour to know about:
|
|||||||
|
|
||||||
- `Entity/Task.php` and `TaskRepository.php`: a task (table `mt3s_mp_program_tasks`): type (with its pictogram), name, description, program, kind (task, milestone or phase), optional start and end dates (plain dates, no time), definition of done, planned work in whole hours, status (not for phases), dependencies (table `mt3s_mp_program_task_dependencies`) and RACI assignments (table `mt3s_mp_program_task_raci` with its `mt3s_mp_program_task_raci_stakeholders` join table)
|
- `Entity/Task.php` and `TaskRepository.php`: a task (table `mt3s_mp_program_tasks`): type (with its pictogram), name, description, program, kind (task, milestone or phase), optional start and end dates (plain dates, no time), definition of done, planned work in whole hours, status (not for phases), dependencies (table `mt3s_mp_program_task_dependencies`) and RACI assignments (table `mt3s_mp_program_task_raci` with its `mt3s_mp_program_task_raci_stakeholders` join table)
|
||||||
- `Entity/TaskStatus.php`: the status enum. The order of its cases is the order of the dropdown: `new` (New, the default), `todo` (To do), `in_progress` (In progress), `done` (Done). Stored as `VARCHAR(20)`, indexed.
|
- `Entity/TaskStatus.php`: the status enum. The order of its cases is the order of the dropdown: `new` (New, the default), `todo` (To do), `in_progress` (In progress), `done` (Done). Stored as `VARCHAR(20)`, indexed.
|
||||||
- `Model/TaskModel.php`: the model, available as `mt3s.marketing_program.model.task` or with `getModel('mt3smp.task')`. `getTaskTree($program)` returns a program's tasks as flat rows for the Tasks tab, ordered by name, with their dependencies and RACI rows fully loaded.
|
- `Model/TaskModel.php`: the model, available as `mautic.mt3smarketingprogram.model.task` or with `getModel('mt3smarketingprogram.task')`. `getTaskTree($program)` returns a program's tasks as flat rows for the Tasks tab, ordered by name, with their dependencies and RACI rows fully loaded.
|
||||||
- `Form/Type/TaskType.php`: the create and edit form
|
- `Form/Type/TaskType.php`: the create and edit form
|
||||||
- `Validator/Constraints/ValidTaskDependency.php`: a dependency must point at another task of the same program, and the dependency graph must not form a cycle (followed through the database, so a cycle crossing other tasks is caught too)
|
- `Validator/Constraints/ValidTaskDependency.php`: a dependency must point at another task of the same program, and the dependency graph must not form a cycle (followed through the database, so a cycle crossing other tasks is caught too)
|
||||||
|
|
||||||
@@ -212,7 +235,7 @@ When you change the schema, add a migration in `Migrations/` and increase `versi
|
|||||||
|
|
||||||
To avoid collisions with other plugins, such as UTM Manager, every identifier in this bundle is prefixed with the bundle's name (the `MT3S` in `MT3SMarketingProgramBundle`):
|
To avoid collisions with other plugins, such as UTM Manager, every identifier in this bundle is prefixed with the bundle's name (the `MT3S` in `MT3SMarketingProgramBundle`):
|
||||||
|
|
||||||
- Service IDs: `mt3s.marketing_program.*` (and the models resolve from `getModel('mt3smp.program')` etc.)
|
- Service IDs: `mt3s.marketing_program.*` (and the models resolve from `getModel('mt3smarketingprogram.program')` etc.)
|
||||||
- Form block prefixes: `mt3s_marketing_program_*` (`mt3s_marketing_program_task`, `mt3s_marketing_program_audience`, …)
|
- Form block prefixes: `mt3s_marketing_program_*` (`mt3s_marketing_program_task`, `mt3s_marketing_program_audience`, …)
|
||||||
- Route names: `mt3s_marketing_program_*` (e.g. `mt3s_marketing_program_index`, `mt3s_marketing_program_task_action`, with `mt3s_marketing_program_utm_taxonomy_index` for the placeholder)
|
- Route names: `mt3s_marketing_program_*` (e.g. `mt3s_marketing_program_index`, `mt3s_marketing_program_task_action`, with `mt3s_marketing_program_utm_taxonomy_index` for the placeholder)
|
||||||
- Translation keys: `mt3s.marketing_program.*`, plus `mautic.plugin.mt3smarketingprogram.name`
|
- Translation keys: `mt3s.marketing_program.*`, plus `mautic.plugin.mt3smarketingprogram.name`
|
||||||
@@ -231,6 +254,7 @@ The plugin was born as `PlanBundle` with a `Plan` entity (table `plans`) and men
|
|||||||
- 0.16.0: the full rename to `ProgramBundle` / `Program` (and a "plan" became an "initiative"). The bundle namespace, class names, the `plugins` DB row (`ProgramBundle`), all tables (`plan_*` → `initiative_*`), all columns (`plan_id` → `initiative_id`, `role_in_plan` → `role_in_initiative`), all permission keys (`plan:*` → `program:*`), the config parameters and the menu (root **Programs**, entry **Initiatives**, plus the placeholder **UTM Taxonomies**) took the new names. The data was kept: the migration renames the tables, it doesn't rebuild them.
|
- 0.16.0: the full rename to `ProgramBundle` / `Program` (and a "plan" became an "initiative"). The bundle namespace, class names, the `plugins` DB row (`ProgramBundle`), all tables (`plan_*` → `initiative_*`), all columns (`plan_id` → `initiative_id`, `role_in_plan` → `role_in_initiative`), all permission keys (`plan:*` → `program:*`), the config parameters and the menu (root **Programs**, entry **Initiatives**, plus the placeholder **UTM Taxonomies**) took the new names. The data was kept: the migration renames the tables, it doesn't rebuild them.
|
||||||
- 0.17.0: the rename to `MT3SMarketingProgramBundle` / "MT3S Marketing Program", and an initiative became a marketing program. The bundle namespace, class names, the `plugins` DB row (`MT3SMarketingProgramBundle`, name "MT3S Marketing Program"), all tables (`initiative_*` → `mt3s_mp_program_*`), all columns (`initiative_id` → `program_id`, `role_in_initiative` → `role_in_program`), all permission keys (`program:*` → `mt3smarketingprogram:*`), the routes, the service IDs, the config parameters, the URLs (`/s/marketing-programs`, …) and the menu (root **Marketing Programs**, entry **Marketing Programs**) took the new names, and the plugin's events (`mt3s.marketing_program.*`) and the `mt3s:marketing-program:refresh-stats` command were added. The data was kept again: `Version_0_17_0.php` renames the tables and carries over the rows the rename orphans — the plugins row, the roles' permission rows (which the 0.16.0 rename had missed), the categories (`plan`- and `initiative`-era rows) and the audit log.
|
- 0.17.0: the rename to `MT3SMarketingProgramBundle` / "MT3S Marketing Program", and an initiative became a marketing program. The bundle namespace, class names, the `plugins` DB row (`MT3SMarketingProgramBundle`, name "MT3S Marketing Program"), all tables (`initiative_*` → `mt3s_mp_program_*`), all columns (`initiative_id` → `program_id`, `role_in_initiative` → `role_in_program`), all permission keys (`program:*` → `mt3smarketingprogram:*`), the routes, the service IDs, the config parameters, the URLs (`/s/marketing-programs`, …) and the menu (root **Marketing Programs**, entry **Marketing Programs**) took the new names, and the plugin's events (`mt3s.marketing_program.*`) and the `mt3s:marketing-program:refresh-stats` command were added. The data was kept again: `Version_0_17_0.php` renames the tables and carries over the rows the rename orphans — the plugins row, the roles' permission rows (which the 0.16.0 rename had missed), the categories (`plan`- and `initiative`-era rows) and the audit log.
|
||||||
- 0.18.0: the merge of the standalone **Smartlinks** plugin (`SmartlinksBundle`, versions 0.1.0–0.6.0) into this bundle. The Smart Links and UTM Taxonomies code, tables (`smart_links`, `smart_link_hits`, `utm_taxonomies`), routes (`/s/smart-links`, `/s/utm-taxonomies`, the public `/l/{slug}`), translation keys (`mautic.smartlinks.*`) and settings keys (`smartlinks_*`, with the legacy `utm_manager_*` keys still readable) are unchanged; only the PHP namespace (`MauticPlugin\SmartlinksBundle\` → `MauticPlugin\MT3SMarketingProgramBundle\`), the service IDs, the template namespace (`@Smartlinks/` → `@MT3SMarketingProgram/`), the **Plugins page entry** (one row: "MT3S Marketing Program") and the **permission base** changed (`smartlinks:smart_links:*` → `mt3smarketingprogram:smart_links:*`, `smartlinks:taxonomies:*` → `mt3smarketingprogram:taxonomies:*` — roles must be re-granted). The incoming migrations were renamed `Version_0_X_0_SmartLinks.php` to avoid the class-name collision with this bundle's own migrations. The old placeholder page `/s/marketing-program-utm-taxonomies` is gone (the real feature is at `/s/utm-taxonomies`), and the dev environment mounts only this repository. The source repository is archived at its `post-merge-v1` tag.
|
- 0.18.0: the merge of the standalone **Smartlinks** plugin (`SmartlinksBundle`, versions 0.1.0–0.6.0) into this bundle. The Smart Links and UTM Taxonomies code, tables (`smart_links`, `smart_link_hits`, `utm_taxonomies`), routes (`/s/smart-links`, `/s/utm-taxonomies`, the public `/l/{slug}`), translation keys (`mautic.smartlinks.*`) and settings keys (`smartlinks_*`, with the legacy `utm_manager_*` keys still readable) are unchanged; only the PHP namespace (`MauticPlugin\SmartlinksBundle\` → `MauticPlugin\MT3SMarketingProgramBundle\`), the service IDs, the template namespace (`@Smartlinks/` → `@MT3SMarketingProgram/`), the **Plugins page entry** (one row: "MT3S Marketing Program") and the **permission base** changed (`smartlinks:smart_links:*` → `mt3smarketingprogram:smart_links:*`, `smartlinks:taxonomies:*` → `mt3smarketingprogram:taxonomies:*` — roles must be re-granted). The incoming migrations were renamed `Version_0_X_0_SmartLinks.php` to avoid the class-name collision with this bundle's own migrations. The old placeholder page `/s/marketing-program-utm-taxonomies` is gone (the real feature is at `/s/utm-taxonomies`), and the dev environment mounts only this repository. The source repository is archived at its `post-merge-v1` tag.
|
||||||
|
- 0.18.1: the naming normalization after the merge. The Smart Links **route names** were unified with the bundle's vendor prefix (`mautic_smartlinks_*` → `mt3s_smart_links_*`; the paths are unchanged: `/s/smart-links`, `/s/utm-taxonomies`, the public `/l/{slug}`), the **model service aliases** were collapsed to one canonical alias per model (`mautic.mt3smarketingprogram.model.<entity>`, so `getModel('mt3smarketingprogram.smart_link')`; the old `mt3s.*` and `mautic.mt3smp.*`-era aliases are gone), the **translation keys** of the domain were renamed (`mautic.smartlinks.*` → `mt3s.smart_links.*`; `mautic.config.tab.smartlinksconfig` stays, it is core's key), the **settings parameters** were renamed (`smartlinks_utm_config` → `mt3s_smart_links_utm_config`, `smartlinks_config` → `mt3s_smart_links_config`, with both legacy keys — the standalone SmartlinksBundle's `smartlinks_*` and the UtmManagerBundle's `utm_manager_*` — still readable until the settings are saved again), the **JS loader prefixes** were unified (`smartlinksSmartLink`/`smartlinksUtmTaxonomy` → `mt3sMpSmartLink`/`mt3sMpUtmTaxonomy`), `Integration/Support/ConfigSupport` was renamed `SmartlinksConfigSupport`, the integration display names were aligned ("MT3S Marketing Program" / "Smart Links") and the phpunit suite was renamed (`UtmManagerBundle` → `MT3SMarketingProgramBundle`). No tables, columns, URLs or stored data changed.
|
||||||
- The old URLs (`/s/plans`, `/s/plan-tasks`, `/s/programs`, `/s/program-tasks`, …) are gone: the routes were renamed and the old names return 404.
|
- The old URLs (`/s/plans`, `/s/plan-tasks`, `/s/programs`, `/s/program-tasks`, …) are gone: the routes were renamed and the old names return 404.
|
||||||
|
|
||||||
A rename like this needs care:
|
A rename like this needs care:
|
||||||
@@ -238,5 +262,5 @@ A rename like this needs care:
|
|||||||
- The historical migrations must stay literal (they describe the old schema) or be neutralized; after the entity renames, their Doctrine mappings no longer match and they can only run with literal SQL.
|
- The historical migrations must stay literal (they describe the old schema) or be neutralized; after the entity renames, their Doctrine mappings no longer match and they can only run with literal SQL.
|
||||||
- The `plugins` DB row must be updated to the new bundle name (and its version kept), or Mautic's installer treats the plugin as new and its `SchemaTool` pass creates empty tables from the current mappings. If that happens, drop the empty tables and turn the install into an update before reloading.
|
- The `plugins` DB row must be updated to the new bundle name (and its version kept), or Mautic's installer treats the plugin as new and its `SchemaTool` pass creates empty tables from the current mappings. If that happens, drop the empty tables and turn the install into an update before reloading.
|
||||||
- The permission keys of each role are stored in the `permissions` table per (bundle, name); a role that had `plan:plans:*` grants doesn't automatically get `mt3smarketingprogram:programs:*`, and cached permission sets in the sessions need a re-login.
|
- The permission keys of each role are stored in the `permissions` table per (bundle, name); a role that had `plan:plans:*` grants doesn't automatically get `mt3smarketingprogram:programs:*`, and cached permission sets in the sessions need a re-login.
|
||||||
- `getModel()` resolves `mt3smp.program` to the service `mt3s.marketing_program.model.program`, unlike core bundles' `mautic.<x>.model.<x>`: only the service IDs decide.
|
- `getModel('mt3smarketingprogram.<entity>')` resolves to the service `mautic.mt3smarketingprogram.model.<entity>`, like core bundles' `mautic.<x>.model.<x>`: only the service IDs decide.
|
||||||
- The `config/local.php` parameter keys are not renamed by the migration either (they are not in the database): `plan_currency` → `mt3s_marketing_program_currency`, the `plan_*_types` lists → `mt3s_marketing_program_*_types`, and the pre-0.15 audience keys `plan_target_attribute_*`, `plan_target_decision_roles` and `plan_target_tones` → `mt3s_marketing_program_audience_attribute_*`, `mt3s_marketing_program_audience_decision_roles` and `mt3s_marketing_program_audience_tones`. Rename them by hand after upgrading, or the type lists on the settings page and every type dropdown read empty (the stored items keep their type keys, they only show "Unknown type").
|
- The `config/local.php` parameter keys are not renamed by the migration either (they are not in the database): `plan_currency` → `mt3s_marketing_program_currency`, the `plan_*_types` lists → `mt3s_marketing_program_*_types`, and the pre-0.15 audience keys `plan_target_attribute_*`, `plan_target_decision_roles` and `plan_target_tones` → `mt3s_marketing_program_audience_attribute_*`, `mt3s_marketing_program_audience_decision_roles` and `mt3s_marketing_program_audience_tones`. Rename them by hand after upgrading, or the type lists on the settings page and every type dropdown read empty (the stored items keep their type keys, they only show "Unknown type").
|
||||||
Reference in new issue
Block a user