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.
This commit is contained in:
1 parent
8268fad886
commit
71ff11390b
121 files changed
+5011
-2874
No files matched your search
+10
-10
@@ -2,19 +2,19 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace MauticPlugin\PlanBundle\Model;
|
||||
namespace MauticPlugin\ProgramBundle\Model;
|
||||
|
||||
use Mautic\CoreBundle\Model\FormModel;
|
||||
use MauticPlugin\PlanBundle\Entity\Plan;
|
||||
use MauticPlugin\PlanBundle\Entity\Task;
|
||||
use MauticPlugin\PlanBundle\Entity\TaskRepository;
|
||||
use MauticPlugin\PlanBundle\Form\Type\TaskType;
|
||||
use MauticPlugin\ProgramBundle\Entity\Initiative;
|
||||
use MauticPlugin\ProgramBundle\Entity\Task;
|
||||
use MauticPlugin\ProgramBundle\Entity\TaskRepository;
|
||||
use MauticPlugin\ProgramBundle\Form\Type\TaskType;
|
||||
use Symfony\Component\Form\FormFactoryInterface;
|
||||
use Symfony\Component\Form\FormInterface;
|
||||
use Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException;
|
||||
|
||||
/**
|
||||
* Available as mautic.plan.model.task, or getModel('plan.task').
|
||||
* Available as mautic.program.model.task, or getModel('program.task').
|
||||
*
|
||||
* @extends FormModel<Task>
|
||||
*/
|
||||
@@ -30,7 +30,7 @@ class TaskModel extends FormModel
|
||||
|
||||
public function getPermissionBase(): string
|
||||
{
|
||||
return 'plan:tasks';
|
||||
return 'program:tasks';
|
||||
}
|
||||
|
||||
public function getEntity($id = null): ?Task
|
||||
@@ -45,16 +45,16 @@ class TaskModel extends FormModel
|
||||
}
|
||||
|
||||
/**
|
||||
* The plan's tasks as rows for the plan's Tasks tab: the tasks ordered by name, each with its
|
||||
* The plan's tasks as rows for the initiative's Tasks tab: the tasks ordered by name, each with its
|
||||
* dependencies and RACI rows loaded. The former parent/child tree is gone; the tab lists the
|
||||
* tasks flat, and the dependencies are shown per task.
|
||||
*
|
||||
* @return array<int, array{task: Task, depth: int}>
|
||||
*/
|
||||
public function getTaskTree(Plan $plan): array
|
||||
public function getTaskTree(Initiative $initiative): array
|
||||
{
|
||||
$rows = [];
|
||||
foreach ($this->getRepository()->findByPlan($plan) as $task) {
|
||||
foreach ($this->getRepository()->findByInitiative($initiative) as $task) {
|
||||
$rows[] = ['task' => $task, 'depth' => 0];
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user