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