mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +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)
|
||||
{
|
||||
$workflow = $this->registry->get($entity->getTask(), $entity->getData['workflow']);
|
||||
$transition = $this->getTransitionByName($entity->getTransition(), $workflow);
|
||||
|
||||
if (isset($entity->getData()['workflow'])) {
|
||||
$workflow = $this->registry->get($entity->getTask(), $entity->getData()['workflow']);
|
||||
$transition = $this->getTransitionByName($entity->getTransition(), $workflow);
|
||||
}
|
||||
|
||||
return [
|
||||
'template' => 'ChillTaskBundle:Timeline:single_task_transition_task_context.html.twig',
|
||||
'template_data' => [
|
||||
'task' => $args['task'],
|
||||
'event' => $entity,
|
||||
'transition' => $transition
|
||||
'transition' => $transition ?? null
|
||||
]
|
||||
];
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user