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:
Alexandre Gain committed 2026-11-15 17:48:01 +01:00
1 parent 687d33d30c
commit ea88b7a772
131 files changed
+3238 -2836

No files matched your search

+19 -19
View File
@@ -2,7 +2,7 @@
declare(strict_types=1);
namespace MauticPlugin\ProgramBundle\Entity;
namespace MauticPlugin\MT3SMarketingProgramBundle\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
@@ -16,20 +16,20 @@ use Symfony\Component\Validator\Constraints\NotBlank;
use Symfony\Component\Validator\Mapping\ClassMetadata;
/**
* A stakeholder of the program: a person, a company or a team involved in the initiatives ("Agency XYZ",
* A stakeholder of the program: a person, a company or a team involved in the mt3s_mp_programs ("Agency XYZ",
* "Exec committee"). Stakeholders are a global directory (Programs > Stakeholders), independent of
* initiatives; an initiative links to them through InitiativeStakeholder, which carries the stakeholder's role in that
* initiative.
* mt3s_mp_programs; an program links to them through ProgramStakeholder, which carries the stakeholder's role in that
* program.
*
* The type is the key of a stakeholder type set up in Settings > Configuration > Initiative Settings
* The type is the key of a stakeholder type set up in Settings > Configuration > Program Settings
* (parameter program_stakeholder_types); see ItemTypeProvider (kind "stakeholder").
*
* isPublished (from FormEntity) means "active": an unpublished stakeholder is hidden from the initiative
* form's stakeholder picker, but keeps its history on the initiatives it is already linked to.
* isPublished (from FormEntity) means "active": an unpublished stakeholder is hidden from the program
* form's stakeholder picker, but keeps its history on the mt3s_mp_programs it is already linked to.
*/
class Stakeholder extends FormEntity
{
public const TABLE_NAME = 'initiative_stakeholders';
public const TABLE_NAME = 'mt3s_mp_program_stakeholders';
public const TYPE_MAX_LENGTH = 64;
@@ -50,16 +50,16 @@ class Stakeholder extends FormEntity
private ?string $type = null;
/**
* The links to the initiatives this stakeholder is assigned to. Inverse side, read-only from here: the
* links are managed from the plans (Initiative::addStakeholder/removeStakeholder).
* The links to the mt3s_mp_programs this stakeholder is assigned to. Inverse side, read-only from here: the
* links are managed from the plans (Program::addStakeholder/removeStakeholder).
*
* @var Collection<int, InitiativeStakeholder>
* @var Collection<int, ProgramStakeholder>
*/
private Collection $initiativeLinks;
private Collection $programLinks;
public function __construct()
{
$this->initiativeLinks = new ArrayCollection();
$this->programLinks = new ArrayCollection();
}
public static function loadMetadata(OrmClassMetadata $metadata): void
@@ -96,7 +96,7 @@ class Stakeholder extends FormEntity
->nullable()
->build();
$builder->createOneToMany('initiativeLinks', InitiativeStakeholder::class)
$builder->createOneToMany('programLinks', ProgramStakeholder::class)
->mappedBy('stakeholder')
->fetchExtraLazy()
->build();
@@ -108,7 +108,7 @@ class Stakeholder extends FormEntity
{
$metadata->addPropertyConstraint('name', new NotBlank(message: 'mautic.core.name.required'));
$metadata->addPropertyConstraint('name', new Length(max: 191));
$metadata->addPropertyConstraint('email', new Email(mode: Email::VALIDATION_MODE_HTML5, message: 'mautic.program.stakeholder.email.invalid'));
$metadata->addPropertyConstraint('email', new Email(mode: Email::VALIDATION_MODE_HTML5, message: 'mt3s.marketing_program.stakeholder.email.invalid'));
$metadata->addPropertyConstraint('email', new Length(max: 191));
$metadata->addPropertyConstraint('phone', new Length(max: 50));
$metadata->addPropertyConstraint('role', new Length(max: 191));
@@ -178,13 +178,13 @@ class Stakeholder extends FormEntity
}
/**
* The links to the initiatives this stakeholder is assigned to, each with its role in that initiative.
* The links to the mt3s_mp_programs this stakeholder is assigned to, each with its role in that program.
*
* @return Collection<int, InitiativeStakeholder>
* @return Collection<int, ProgramStakeholder>
*/
public function getInitiativeLinks(): Collection
public function getProgramLinks(): Collection
{
return $this->initiativeLinks;
return $this->programLinks;
}
public function setType(?string $type): static