$attributes =
['shape' => 'box', 'regular' => true
];
$backgroundColor =
$workflowMetadata->
getMetadata('bg_color',
$transition);
if (null !==
$backgroundColor) { $attributes['style'
] = 'filled';
$attributes['fillcolor'
] =
$backgroundColor;
} $name =
$workflowMetadata->
getMetadata('label',
$transition) ??
$transition->
getName();
$metadata =
[];
if ($withMetadata) { $metadata =
$workflowMetadata->
getTransitionMetadata($transition);
unset($metadata['label'
]);
} $transitions[] =
[ 'attributes' =>
$attributes,
'name' =>
$name,
'metadata' =>
$metadata,
];
} return $transitions;
}