public function createStatusVertex(StateInterface $state)
{
$stateName = $state->getName();
$vertex = $this->graph->createVertex($stateName, true);
if ($state instanceof \ArrayAccess) {
$layout = $this->getLayoutOptions($state, $this->stateLayout);
if (method_exists($vertex, 'setLayout')) {
$vertex->setLayout($layout);
} else {
foreach ($layout as $name => $value) {
$vertex->setAttribute('graphviz.' . $name, $value);
}
}
}
return $vertex;
}