Two domains, one MT3S bundle: Marketing Programs (unchanged) and the
imported Smart Links (smart links + UTM taxonomies), each keeping its
own menu, tables, routes and translations.
- Code moved from MauticPlugin\SmartlinksBundle\ to
MauticPlugin\MT3SMarketingProgramBundle\; template namespace
@Smartlinks/ -> @MT3SMarketingProgram/; smartlinks.js ->
Assets/js/mt3s-mp-smartlinks.js; icon -> Assets/img/smartlinks-icon.svg.
- Incoming migrations renamed Version_0_X_0_SmartLinks.php to avoid
the class-name collision; schema untouched, data intact.
- Permissions folded into MT3SMarketingProgramPermissions:
smart_links + taxonomies under the mt3smarketingprogram: base
(roles that had the old smartlinks: grants must be re-granted).
- config.php: Smart Links routes + menu group, public /l/{slug},
SmartlinksIntegration services, smartlinks_* parameters (legacy
utm_manager_* keys still readable), version 0.18.0. The 0.17.0
placeholder /s/marketing-program-utm-taxonomies is replaced by the
real /s/utm-taxonomies.
- Translations merged (en_US) and added (fr_FR); Tests/ + phpunit moved
in; readme documents both domains and the 0.18.0 merge history.
Verified live: menus, both config tabs, both lists + forms, program
pages, public redirect with taxonomy UTM values, host + unknown-slug
404s, 90/90 unit tests, full php -l, all ini catalogs parse.
58 lines
2.3 KiB
PHP
58 lines
2.3 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace MauticPlugin\MT3SMarketingProgramBundle\Security\Permissions;
|
|
|
|
use Mautic\CoreBundle\Security\Permissions\AbstractPermissions;
|
|
use Symfony\Component\Form\FormBuilderInterface;
|
|
|
|
/**
|
|
* Permission keys: mt3smarketingprogram:programs:*, mt3smarketingprogram:tasks:*, mt3smarketingprogram:stakeholders:* and
|
|
* mt3smarketingprogram:audiences:* (view/edit/delete/publish own and other, create, full), mt3smarketingprogram:itemtypes:*
|
|
* (the Item types page, Programs > Item types), and mt3smarketingprogram:categories:* (managing the
|
|
* "program" category type).
|
|
*
|
|
* Shown under Settings > Roles. Core discovers this class from Security/Permissions/.
|
|
*/
|
|
class MT3SMarketingProgramPermissions extends AbstractPermissions
|
|
{
|
|
/**
|
|
* @param mixed[] $params
|
|
*/
|
|
public function __construct(array $params)
|
|
{
|
|
parent::__construct($params);
|
|
|
|
$this->addStandardPermissions('categories');
|
|
$this->addExtendedPermissions('programs');
|
|
$this->addExtendedPermissions('tasks');
|
|
$this->addExtendedPermissions('stakeholders');
|
|
$this->addExtendedPermissions('audiences');
|
|
$this->addExtendedPermissions('smart_links');
|
|
$this->addExtendedPermissions('taxonomies');
|
|
$this->addStandardPermissions('itemtypes');
|
|
}
|
|
|
|
public function getName(): string
|
|
{
|
|
return 'mt3smarketingprogram';
|
|
}
|
|
|
|
/**
|
|
* @param array<string, mixed> $options
|
|
* @param array<string, mixed> $data
|
|
*/
|
|
public function buildForm(FormBuilderInterface &$builder, array $options, array $data): void
|
|
{
|
|
$this->addStandardFormFields('mt3smarketingprogram', 'categories', $builder, $data);
|
|
$this->addExtendedFormFields('mt3smarketingprogram', 'programs', $builder, $data);
|
|
$this->addExtendedFormFields('mt3smarketingprogram', 'tasks', $builder, $data);
|
|
$this->addExtendedFormFields('mt3smarketingprogram', 'stakeholders', $builder, $data);
|
|
$this->addExtendedFormFields('mt3smarketingprogram', 'audiences', $builder, $data);
|
|
$this->addExtendedFormFields('mt3smarketingprogram', 'smart_links', $builder, $data);
|
|
$this->addExtendedFormFields('mt3smarketingprogram', 'taxonomies', $builder, $data);
|
|
$this->addStandardFormFields('mt3smarketingprogram', 'itemtypes', $builder, $data);
|
|
}
|
|
}
|