refactor(program): move item types out of Settings > Configuration

Relocate the item type lists (insights, allocations, objectives, tasks,
stakeholders, audience values) from the Configuration tab to a dedicated
"Item types" page under Programs, served by ItemTypesController at
/program-item-types and guarded by the new program:itemtypes:view
permission. The Program settings tab in Configuration now only holds the
general settings (currency, stakeholder phone region, audience attribute
toggles), so ConfigSubscriber no longer needs the item repositories; the
in-use type protection moved to ItemTypeInUseGuard.
This commit is contained in:
Alexandre Gain committed 2026-11-14 09:20:21 +01:00
1 parent 71ff11390b
commit 687d33d30c
14 files changed
+444 -219

No files matched your search

+15 -3
View File
@@ -51,6 +51,12 @@ return [
'path' => '/program-utm-taxonomies/{page}',
'controller' => 'MauticPlugin\ProgramBundle\Controller\UtmTaxonomyController::indexAction',
],
// The type lists of the plugin's items (Insights, allocations, objectives, tasks,
// stakeholders, audience values), moved out of Settings > Configuration.
'program_item_types_index' => [
'path' => '/program-item-types',
'controller' => 'MauticPlugin\ProgramBundle\Controller\ItemTypesController::indexAction',
],
],
],
@@ -60,7 +66,7 @@ return [
'mautic.program.menu.root' => [
'id' => 'program_root',
'iconClass' => 'ri-calendar-line',
'access' => ['program:initiatives:viewown', 'program:initiatives:viewother', 'program:tasks:viewown', 'program:tasks:viewother', 'program:stakeholders:viewown', 'program:stakeholders:viewother', 'program:audiences:viewown', 'program:audiences:viewother'],
'access' => ['program:initiatives:viewown', 'program:initiatives:viewother', 'program:tasks:viewown', 'program:tasks:viewother', 'program:stakeholders:viewown', 'program:stakeholders:viewother', 'program:audiences:viewown', 'program:audiences:viewother', 'program:itemtypes:view'],
'priority' => 5,
'children' => [
'mautic.program.menu.index' => [
@@ -93,6 +99,12 @@ return [
'access' => ['program:initiatives:viewown', 'program:initiatives:viewother'],
'priority' => 60,
],
'mautic.program.menu.item_types' => [
'id' => 'program_item_types_index',
'route' => 'program_item_types_index',
'access' => ['program:itemtypes:view'],
'priority' => 55,
],
],
],
],
@@ -129,8 +141,8 @@ return [
// Program Settings. Read it through CurrencyProvider.
'program_currency' => 'EUR',
// Item types, edited in Settings > Configuration > Program Settings. Read them through ItemTypeProvider.
// Each is a list of ['key' => …, 'names' => [locale => …], 'descriptions' => [locale => …]],
// Item types, edited on the Item types page (Programs > Item types). Read them through
// ItemTypeProvider. Each is a list of ['key' => …, 'names' => [locale => …], 'descriptions' => [locale => …]],
// plus 'icon' => a Remix Icon class for description, allocation, objective, task and stakeholder types.
'program_description_item_types' => [],
'program_allocation_item_types' => [],