Files
mautic-marketing-program-bu…/Controller/StakeholderController.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

84 lines
2.1 KiB
PHP

<?php
declare(strict_types=1);
namespace MauticPlugin\ProgramBundle\Controller;
use Mautic\CoreBundle\Controller\AbstractStandardFormController;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
/**
* List, create, edit and delete stakeholders (Programs > Stakeholders), the global directory, using
* core's standard CRUD flow. Stakeholders are independent of initiatives; initiatives link to them from their
* Stakeholders tab.
*
* Model program.stakeholder (mautic.program.model.stakeholder), permission base program:stakeholders,
* translation base mautic.program.stakeholder.
*/
class StakeholderController extends AbstractStandardFormController
{
public const ROUTE_INDEX = 'initiative_stakeholder_index';
public const ROUTE_ACTION = 'initiative_stakeholder_action';
protected function getModelName(): string
{
return 'program.stakeholder';
}
protected function getTemplateBase(): string
{
return '@Program/Stakeholder';
}
protected function getIndexRoute(): string
{
return self::ROUTE_INDEX;
}
protected function getActionRoute(): string
{
return self::ROUTE_ACTION;
}
protected function getJsLoadMethodPrefix(): string
{
return 'programStakeholder';
}
/**
* @param int $page
*/
public function indexAction(Request $request, $page = 1): Response
{
return $this->indexStandard($request, $page);
}
public function newAction(Request $request): Response
{
return $this->newStandard($request);
}
/**
* @param int $objectId
* @param bool $ignorePost
*/
public function editAction(Request $request, $objectId, $ignorePost = false): Response
{
return $this->editStandard($request, $objectId, $ignorePost);
}
/**
* @param int $objectId
*/
public function deleteAction(Request $request, $objectId): Response
{
return $this->deleteStandard($request, $objectId);
}
public function batchDeleteAction(Request $request): Response
{
return $this->batchDeleteStandard($request);
}
}