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.
40 lines
1.2 KiB
PHP
40 lines
1.2 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace MauticPlugin\ProgramBundle\Controller;
|
|
|
|
use Mautic\CoreBundle\Controller\CommonController;
|
|
use Symfony\Component\HttpFoundation\Request;
|
|
use Symfony\Component\HttpFoundation\Response;
|
|
|
|
/**
|
|
* UTM Taxonomies (Programs > UTM Taxonomies): a placeholder for now, so the menu entry has a
|
|
* page. The content (classifying the UTM parameters of the programs' campaigns and links) comes
|
|
* later; until then the page shows an empty content block.
|
|
*/
|
|
class UtmTaxonomyController extends CommonController
|
|
{
|
|
public const ROUTE_INDEX = 'program_utm_taxonomy_index';
|
|
|
|
/**
|
|
* @param int $page
|
|
*/
|
|
public function indexAction(Request $request, $page = 1): Response
|
|
{
|
|
$tmpl = $request->isXmlHttpRequest() ? $request->get('tmpl', 'index') : 'index';
|
|
|
|
return $this->delegateView([
|
|
'viewParameters' => [
|
|
'tmpl' => $tmpl,
|
|
],
|
|
'contentTemplate' => '@Program/UtmTaxonomy/list.html.twig',
|
|
'passthroughVars' => [
|
|
'activeLink' => '#'.self::ROUTE_INDEX,
|
|
'mauticContent' => 'programUtmTaxonomy',
|
|
'route' => $this->generateUrl(self::ROUTE_INDEX),
|
|
],
|
|
]);
|
|
}
|
|
}
|