refactor(plugin): rename Plan to Program and add audience/UTM routes
Rename the Plan bundle to Program across config, routes, menus, and controllers (Plan -> Initiative), bump version to 0.16.0, and introduce new audience and UTM taxonomy routes and permissions to support the expanded Programs feature set.
This commit is contained in:
1 parent
8268fad886
commit
71ff11390b
121 files changed
+5011
-2874
No files matched your search
@@ -2,24 +2,24 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace MauticPlugin\PlanBundle\Model;
|
||||
namespace MauticPlugin\ProgramBundle\Model;
|
||||
|
||||
use libphonenumber\NumberParseException;
|
||||
use libphonenumber\PhoneNumberFormat;
|
||||
use libphonenumber\PhoneNumberUtil;
|
||||
use Mautic\CoreBundle\Model\FormModel;
|
||||
use MauticPlugin\PlanBundle\Entity\Stakeholder;
|
||||
use MauticPlugin\PlanBundle\Entity\StakeholderRepository;
|
||||
use MauticPlugin\PlanBundle\Form\Type\StakeholderType;
|
||||
use MauticPlugin\ProgramBundle\Entity\Stakeholder;
|
||||
use MauticPlugin\ProgramBundle\Entity\StakeholderRepository;
|
||||
use MauticPlugin\ProgramBundle\Form\Type\StakeholderType;
|
||||
use Symfony\Component\Form\FormFactoryInterface;
|
||||
use Symfony\Component\Form\FormInterface;
|
||||
use Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException;
|
||||
|
||||
/**
|
||||
* Available as mautic.plan.model.stakeholder, or getModel('plan.stakeholder').
|
||||
* Available as mautic.program.model.stakeholder, or getModel('program.stakeholder').
|
||||
*
|
||||
* On save, the phone number is normalized to E.164 using the default region from Settings >
|
||||
* Configuration > Plan Settings (parameter plan_stakeholder_phone_region, FR by default). A number that
|
||||
* Configuration > Initiative Settings (parameter program_stakeholder_phone_region, FR by default). A number that
|
||||
* doesn't parse (free input, extensions…) is kept exactly as typed: the save is never blocked.
|
||||
*/
|
||||
class StakeholderModel extends FormModel
|
||||
@@ -27,7 +27,7 @@ class StakeholderModel extends FormModel
|
||||
/**
|
||||
* local.php parameter: default region for phone numbers typed without a country prefix.
|
||||
*/
|
||||
public const PHONE_REGION_PARAMETER = 'plan_stakeholder_phone_region';
|
||||
public const PHONE_REGION_PARAMETER = 'program_stakeholder_phone_region';
|
||||
|
||||
public const DEFAULT_PHONE_REGION = 'FR';
|
||||
|
||||
@@ -41,7 +41,7 @@ class StakeholderModel extends FormModel
|
||||
|
||||
public function getPermissionBase(): string
|
||||
{
|
||||
return 'plan:stakeholders';
|
||||
return 'program:stakeholders';
|
||||
}
|
||||
|
||||
public function getEntity($id = null): ?Stakeholder
|
||||
|
||||
Reference in new issue
Block a user