mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-28 18:43:49 +00:00
add closed tasks
- the entity has a new column / property "closed" (boolean) - An event listener in created during container compilation, which listen on tasks status changed - The taskworkflow manager and task workflow definition indicate if the tasks is closed ; - Add list for closed tasks in controller, and change parameter 'date_status' to 'status'; - and change query to allow to filter on closed tasks
This commit is contained in:
@@ -39,8 +39,17 @@ class TaskWorkflowDefinitionCompilerPass implements CompilerPassInterface
|
||||
$workflowManagerDefinition = $container->getDefinition(TaskWorkflowManager::class);
|
||||
|
||||
foreach ($container->findTaggedServiceIds('chill_task.workflow_definition') as $id => $tags) {
|
||||
// registering the definition to manager
|
||||
$workflowManagerDefinition
|
||||
->addMethodCall('addDefinition', [new Reference($id)]);
|
||||
// adding a listener for currentStatus changes
|
||||
$definition = $container->getDefinition($id);
|
||||
$workflowManagerDefinition
|
||||
->addTag('kernel.event_listener', [
|
||||
'event' => sprintf('workflow.%s.entered', $definition->getClass()::getAssociatedWorkflowName()),
|
||||
'method' => 'onTaskStateEntered',
|
||||
'priority' => -255
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user