mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-12 21:34:25 +00:00
entity getdata workflow is not always defined
This commit is contained in:
parent
43d12a9647
commit
34a913e8e6
@ -97,15 +97,17 @@ class SingleTaskTaskLifeCycleEventTimelineProvider implements TimelineProviderIn
|
|||||||
|
|
||||||
public function getEntityTemplate($entity, $context, array $args)
|
public function getEntityTemplate($entity, $context, array $args)
|
||||||
{
|
{
|
||||||
$workflow = $this->registry->get($entity->getTask(), $entity->getData['workflow']);
|
if (isset($entity->getData()['workflow'])) {
|
||||||
$transition = $this->getTransitionByName($entity->getTransition(), $workflow);
|
$workflow = $this->registry->get($entity->getTask(), $entity->getData()['workflow']);
|
||||||
|
$transition = $this->getTransitionByName($entity->getTransition(), $workflow);
|
||||||
|
}
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'template' => 'ChillTaskBundle:Timeline:single_task_transition_task_context.html.twig',
|
'template' => 'ChillTaskBundle:Timeline:single_task_transition_task_context.html.twig',
|
||||||
'template_data' => [
|
'template_data' => [
|
||||||
'task' => $args['task'],
|
'task' => $args['task'],
|
||||||
'event' => $entity,
|
'event' => $entity,
|
||||||
'transition' => $transition
|
'transition' => $transition ?? null
|
||||||
]
|
]
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user