Files
mautic-marketing-program-bu…/Config/services.php
T
Alexandre Gain 71ff11390b 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.
2026-11-13 22:01:32 +01:00

35 lines
1.5 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\\ProgramBundle\\', '../')
->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\\ProgramBundle\\Entity\\', '../Entity/*Repository.php')
->tag(Doctrine\Bundle\DoctrineBundle\DependencyInjection\Compiler\ServiceRepositoryCompilerPass::REPOSITORY_SERVICE_TAG);
// Lets core resolve the model with getModel('program').
$services->alias('mautic.program.model.initiative', MauticPlugin\ProgramBundle\Model\InitiativeModel::class);
// getModel('program.task').
$services->alias('mautic.program.model.task', MauticPlugin\ProgramBundle\Model\TaskModel::class);
// getModel('program.stakeholder').
$services->alias('mautic.program.model.stakeholder', MauticPlugin\ProgramBundle\Model\StakeholderModel::class);
// getModel('program.audience').
$services->alias('mautic.program.model.audience', MauticPlugin\ProgramBundle\Model\AudienceModel::class);
};