mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-25 16:14:59 +00:00
Use WorkflowInterface instead of Workflow
This commit is contained in:
@@ -17,7 +17,7 @@ use Chill\TaskBundle\Entity\SingleTask;
|
||||
use Chill\TaskBundle\Entity\Task\SingleTaskPlaceEvent;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Symfony\Component\Workflow\Registry;
|
||||
use Symfony\Component\Workflow\Workflow;
|
||||
use Symfony\Component\Workflow\WorkflowInterface;
|
||||
|
||||
/**
|
||||
* Provide timeline elements related to tasks, in tasks context.
|
||||
@@ -108,12 +108,7 @@ class SingleTaskTaskLifeCycleEventTimelineProvider implements TimelineProviderIn
|
||||
return self::TYPE === $type;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $name
|
||||
*
|
||||
* @return \Symfony\Component\Workflow\Transition
|
||||
*/
|
||||
protected function getTransitionByName($name, Workflow $workflow)
|
||||
protected function getTransitionByName(string $name, WorkflowInterface $workflow)
|
||||
{
|
||||
foreach ($workflow->getDefinition()->getTransitions() as $transition) {
|
||||
if ($transition->getName() === $name) {
|
||||
|
@@ -21,7 +21,7 @@ use Chill\TaskBundle\Entity\Task\SingleTaskPlaceEvent;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Symfony\Bundle\SecurityBundle\Security;
|
||||
use Symfony\Component\Workflow\Registry;
|
||||
use Symfony\Component\Workflow\Workflow;
|
||||
use Symfony\Component\Workflow\WorkflowInterface;
|
||||
|
||||
/**
|
||||
* Provide element for timeline for 'person' and 'center' context.
|
||||
@@ -94,12 +94,7 @@ class TaskLifeCycleEventTimelineProvider implements TimelineProviderInterface
|
||||
return self::TYPE === $type;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $name
|
||||
*
|
||||
* @return \Symfony\Component\Workflow\Transition
|
||||
*/
|
||||
protected function getTransitionByName($name, Workflow $workflow)
|
||||
protected function getTransitionByName(string $name, WorkflowInterface $workflow)
|
||||
{
|
||||
foreach ($workflow->getDefinition()->getTransitions() as $transition) {
|
||||
if ($transition->getName() === $name) {
|
||||
|
Reference in New Issue
Block a user