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_*
39 lines
2.1 KiB
PHP
39 lines
2.1 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
use Mautic\CoreBundle\DependencyInjection\MauticCoreExtension;
|
|
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
|
|
|
return function (ContainerConfigurator $configurator): void {
|
|
$services = $configurator->services()
|
|
->defaults()
|
|
->autowire()
|
|
->autoconfigure()
|
|
->public();
|
|
|
|
$excludes = [
|
|
'Tests',
|
|
];
|
|
|
|
$services->load('MauticPlugin\\MT3SMarketingProgramBundle\\', '../')
|
|
->exclude('../{'.implode(',', array_merge(MauticCoreExtension::DEFAULT_EXCLUDES, $excludes)).'}');
|
|
|
|
// Entity/ is excluded above; repositories must still be services for Doctrine to build them.
|
|
$services->load('MauticPlugin\\MT3SMarketingProgramBundle\\Entity\\', '../Entity/*Repository.php')
|
|
->tag(Doctrine\Bundle\DoctrineBundle\DependencyInjection\Compiler\ServiceRepositoryCompilerPass::REPOSITORY_SERVICE_TAG);
|
|
|
|
// Lets core resolve the model with getModel('mt3smp.program').
|
|
$services->alias('mt3s.marketing_program.model.program', MauticPlugin\MT3SMarketingProgramBundle\Model\ProgramModel::class);
|
|
$services->alias('mautic.mt3smp.model.program', MauticPlugin\MT3SMarketingProgramBundle\Model\ProgramModel::class);
|
|
// getModel('mt3smp.task').
|
|
$services->alias('mt3s.marketing_program.model.task', MauticPlugin\MT3SMarketingProgramBundle\Model\TaskModel::class);
|
|
$services->alias('mautic.mt3smp.model.task', MauticPlugin\MT3SMarketingProgramBundle\Model\TaskModel::class);
|
|
// getModel('mt3smp.stakeholder').
|
|
$services->alias('mt3s.marketing_program.model.stakeholder', MauticPlugin\MT3SMarketingProgramBundle\Model\StakeholderModel::class);
|
|
$services->alias('mautic.mt3smp.model.stakeholder', MauticPlugin\MT3SMarketingProgramBundle\Model\StakeholderModel::class);
|
|
// getModel('mt3smp.audience').
|
|
$services->alias('mt3s.marketing_program.model.audience', MauticPlugin\MT3SMarketingProgramBundle\Model\AudienceModel::class);
|
|
$services->alias('mautic.mt3smp.model.audience', MauticPlugin\MT3SMarketingProgramBundle\Model\AudienceModel::class);
|
|
};
|