refactor(plugin): rebrand as MT3SMarketingProgram, release 0.17.0
Rename the plugin's vendor/namespace from experiential/Program to mt3s/MT3SMarketingProgram (composer: mt3s/mautic-marketing-program-bundle): - ProgramBundle -> MT3SMarketingProgramBundle; extension, integration, config support, permissions, events and twig extension renamed likewise - Initiative* -> Program*: controller (InitiativeController -> ProgramController), model, entities, repositories, form types and views (new _tabs/_task_table/_tab_table_filter partials, details page) - Settings config form theme -> _config_mt3smarketingprogramconfig_widget; routes and translations re-prefixed (mt3s_marketing_program_*) - Assets: icon.svg -> mt3s-mp-icon.svg; program.js -> mt3s-mp-program.js (OnLoad hooks renamed mt3sMpProgram*) - Add Command/RefreshStatsCommand; Migrations/Version_0_17_0.php renames the tables to mt3s_mp_program_*
This commit is contained in:
1 parent
687d33d30c
commit
ea88b7a772
131 files changed
+3238
-2836
No files matched your search
@@ -2,7 +2,7 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace MauticPlugin\ProgramBundle\Service;
|
||||
namespace MauticPlugin\MT3SMarketingProgramBundle\Service;
|
||||
|
||||
use Mautic\CoreBundle\Helper\CoreParametersHelper;
|
||||
|
||||
@@ -12,17 +12,17 @@ use Mautic\CoreBundle\Helper\CoreParametersHelper;
|
||||
* Which attributes of an audience persona are offered on the forms is chosen there, one toggle per
|
||||
* attribute, so a b2b install and a b2c install define their personas differently. Each toggle is
|
||||
* a local.php parameter (default enabled; an admin turns off what they don't use):
|
||||
* - program_audience_attribute_tagline (Tagline)
|
||||
* - program_audience_attribute_profile (Profile criteria)
|
||||
* - program_audience_attribute_motivations (Motivations)
|
||||
* - program_audience_attribute_barriers (Barriers)
|
||||
* - program_audience_attribute_frustrations (Frustrations)
|
||||
* - program_audience_attribute_triggers (Triggers)
|
||||
* - program_audience_attribute_decision_role (Decision-making role; values program_audience_decision_roles)
|
||||
* - program_audience_attribute_tones (Preferred tones; values program_audience_tones)
|
||||
* - program_audience_attribute_channels (Preferred channels)
|
||||
* - program_audience_attribute_stages (Stages)
|
||||
* - program_audience_attribute_size (Estimated size)
|
||||
* - mt3s_marketing_program_audience_attribute_tagline (Tagline)
|
||||
* - mt3s_marketing_program_audience_attribute_profile (Profile criteria)
|
||||
* - mt3s_marketing_program_audience_attribute_motivations (Motivations)
|
||||
* - mt3s_marketing_program_audience_attribute_barriers (Barriers)
|
||||
* - mt3s_marketing_program_audience_attribute_frustrations (Frustrations)
|
||||
* - mt3s_marketing_program_audience_attribute_triggers (Triggers)
|
||||
* - mt3s_marketing_program_audience_attribute_decision_role (Decision-making role; values mt3s_marketing_program_audience_decision_roles)
|
||||
* - mt3s_marketing_program_audience_attribute_tones (Preferred tones; values mt3s_marketing_program_audience_tones)
|
||||
* - mt3s_marketing_program_audience_attribute_channels (Preferred channels)
|
||||
* - mt3s_marketing_program_audience_attribute_stages (Stages)
|
||||
* - mt3s_marketing_program_audience_attribute_size (Estimated size)
|
||||
*
|
||||
* The values of the decision roles and the tones are lists edited in the same place, with a name
|
||||
* per language — read through ItemTypeProvider (kinds "audience_decision_role" and "audience_tone").
|
||||
@@ -102,6 +102,6 @@ class AudienceAttributes
|
||||
*/
|
||||
public static function toggleParameter(string $attribute): string
|
||||
{
|
||||
return 'program_audience_attribute_'.$attribute;
|
||||
return 'mt3s_marketing_program_audience_attribute_'.$attribute;
|
||||
}
|
||||
}
|
||||
@@ -2,22 +2,22 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace MauticPlugin\ProgramBundle\Service;
|
||||
namespace MauticPlugin\MT3SMarketingProgramBundle\Service;
|
||||
|
||||
use Mautic\CoreBundle\Helper\CoreParametersHelper;
|
||||
use Symfony\Component\Intl\Currencies;
|
||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
|
||||
/**
|
||||
* The currency of all amounts in the plugin (initiative budgets, allocation costs and totals).
|
||||
* The currency of all amounts in the plugin (program budgets, allocation costs and totals).
|
||||
*
|
||||
* It is a general setting, chosen by an administrator in Settings > Configuration > Program Settings and
|
||||
* stored in the local.php parameter program_currency; users don't pick a currency. Amounts aren't converted
|
||||
* stored in the local.php parameter mt3s_marketing_program_currency; users don't pick a currency. Amounts aren't converted
|
||||
* when it changes: they are simply shown with the new currency.
|
||||
*/
|
||||
class CurrencyProvider
|
||||
{
|
||||
public const CONFIG_PARAMETER = 'program_currency';
|
||||
public const CONFIG_PARAMETER = 'mt3s_marketing_program_currency';
|
||||
|
||||
public const DEFAULT_CURRENCY = 'EUR';
|
||||
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace MauticPlugin\ProgramBundle\Service;
|
||||
namespace MauticPlugin\MT3SMarketingProgramBundle\Service;
|
||||
|
||||
use MauticPlugin\ProgramBundle\Entity\InitiativeAllocationItemRepository;
|
||||
use MauticPlugin\ProgramBundle\Entity\InitiativeDescriptionItemRepository;
|
||||
use MauticPlugin\ProgramBundle\Entity\InitiativeObjectiveRepository;
|
||||
use MauticPlugin\ProgramBundle\Entity\StakeholderRepository;
|
||||
use MauticPlugin\ProgramBundle\Entity\TaskRepository;
|
||||
use MauticPlugin\MT3SMarketingProgramBundle\Entity\ProgramAllocationItemRepository;
|
||||
use MauticPlugin\MT3SMarketingProgramBundle\Entity\ProgramDescriptionItemRepository;
|
||||
use MauticPlugin\MT3SMarketingProgramBundle\Entity\ProgramObjectiveRepository;
|
||||
use MauticPlugin\MT3SMarketingProgramBundle\Entity\StakeholderRepository;
|
||||
use MauticPlugin\MT3SMarketingProgramBundle\Entity\TaskRepository;
|
||||
|
||||
/**
|
||||
* Refuses to remove item types that items or tasks still use: a stored item references its type
|
||||
@@ -18,9 +18,9 @@ use MauticPlugin\ProgramBundle\Entity\TaskRepository;
|
||||
class ItemTypeInUseGuard
|
||||
{
|
||||
public function __construct(
|
||||
private InitiativeDescriptionItemRepository $descriptionItemRepository,
|
||||
private InitiativeAllocationItemRepository $allocationItemRepository,
|
||||
private InitiativeObjectiveRepository $objectiveRepository,
|
||||
private ProgramDescriptionItemRepository $descriptionItemRepository,
|
||||
private ProgramAllocationItemRepository $allocationItemRepository,
|
||||
private ProgramObjectiveRepository $objectiveRepository,
|
||||
private TaskRepository $taskRepository,
|
||||
private StakeholderRepository $stakeholderRepository,
|
||||
private ItemTypeProvider $typeProvider,
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace MauticPlugin\ProgramBundle\Service;
|
||||
namespace MauticPlugin\MT3SMarketingProgramBundle\Service;
|
||||
|
||||
use Mautic\CoreBundle\Helper\CoreParametersHelper;
|
||||
use Mautic\CoreBundle\Helper\LanguageHelper;
|
||||
@@ -10,21 +10,21 @@ use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
|
||||
/**
|
||||
* Reads the item types set up on the Item types page (Programs > Item types). There is one list of types per kind:
|
||||
* - KIND_DESCRIPTION: types of description items (the Insights tab), parameter program_description_item_types;
|
||||
* - KIND_ALLOCATION: types of allocation items (Allocation tab), parameter program_allocation_item_types;
|
||||
* - KIND_OBJECTIVE: types of objectives (Objectives tab), parameter program_objective_types;
|
||||
* - KIND_TASK: types of tasks (Programs > Tasks and the initiative's Tasks tab), parameter program_task_types;
|
||||
* - KIND_STAKEHOLDER: types of stakeholders (Programs > Stakeholders), parameter program_stakeholder_types;
|
||||
* - KIND_DESCRIPTION: types of description items (the Insights tab), parameter mt3s_marketing_program_description_item_types;
|
||||
* - KIND_ALLOCATION: types of allocation items (Allocation tab), parameter mt3s_marketing_program_allocation_item_types;
|
||||
* - KIND_OBJECTIVE: types of objectives (Objectives tab), parameter mt3s_marketing_program_objective_types;
|
||||
* - KIND_TASK: types of tasks (Programs > Tasks and the program's Tasks tab), parameter mt3s_marketing_program_task_types;
|
||||
* - KIND_STAKEHOLDER: types of stakeholders (Programs > Stakeholders), parameter mt3s_marketing_program_stakeholder_types;
|
||||
* - KIND_AUDIENCE_DECISION_ROLE: values of an audience's "Decision-making role" attribute, parameter
|
||||
* program_audience_decision_roles (Item types page);
|
||||
* - KIND_AUDIENCE_TONE: values of an audience's "Preferred tone" attribute, parameter program_audience_tones.
|
||||
* mt3s_marketing_program_audience_decision_roles (Item types page);
|
||||
* - KIND_AUDIENCE_TONE: values of an audience's "Preferred tone" attribute, parameter mt3s_marketing_program_audience_tones.
|
||||
*
|
||||
* Each list is stored in local.php, in display order, and edited on the Item types page
|
||||
* (Programs > Item types; ItemTypesController):
|
||||
*
|
||||
* [
|
||||
* ['key' => 'type_1a2b3c4d', 'names' => ['en_US' => 'Context', 'fr' => 'Contexte'],
|
||||
* 'descriptions' => ['en_US' => 'Why this initiative exists', 'fr' => '…'], 'icon' => 'ri-lightbulb-line'],
|
||||
* 'descriptions' => ['en_US' => 'Why this program exists', 'fr' => '…'], 'icon' => 'ri-lightbulb-line'],
|
||||
* …
|
||||
* ]
|
||||
*
|
||||
@@ -46,13 +46,13 @@ class ItemTypeProvider
|
||||
* Kind => local.php parameter.
|
||||
*/
|
||||
public const PARAMETERS = [
|
||||
self::KIND_DESCRIPTION => 'program_description_item_types',
|
||||
self::KIND_ALLOCATION => 'program_allocation_item_types',
|
||||
self::KIND_OBJECTIVE => 'program_objective_types',
|
||||
self::KIND_TASK => 'program_task_types',
|
||||
self::KIND_STAKEHOLDER => 'program_stakeholder_types',
|
||||
self::KIND_AUDIENCE_DECISION_ROLE => 'program_audience_decision_roles',
|
||||
self::KIND_AUDIENCE_TONE => 'program_audience_tones',
|
||||
self::KIND_DESCRIPTION => 'mt3s_marketing_program_description_item_types',
|
||||
self::KIND_ALLOCATION => 'mt3s_marketing_program_allocation_item_types',
|
||||
self::KIND_OBJECTIVE => 'mt3s_marketing_program_objective_types',
|
||||
self::KIND_TASK => 'mt3s_marketing_program_task_types',
|
||||
self::KIND_STAKEHOLDER => 'mt3s_marketing_program_stakeholder_types',
|
||||
self::KIND_AUDIENCE_DECISION_ROLE => 'mt3s_marketing_program_audience_decision_roles',
|
||||
self::KIND_AUDIENCE_TONE => 'mt3s_marketing_program_audience_tones',
|
||||
];
|
||||
|
||||
public function __construct(
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace MauticPlugin\ProgramBundle\Service;
|
||||
namespace MauticPlugin\MT3SMarketingProgramBundle\Service;
|
||||
|
||||
/**
|
||||
* Pictograms an administrator can give to an item type — description or allocation (Settings >
|
||||
|
||||
Reference in new issue
Block a user