Example #1
0
 /**
  * Returns the node attributes.
  *
  * @param  \Finite\StateMachine\StateMachineInterface $stateMachine
  * @param  string                                     $name
  * @return array
  */
 private function getNodeAttributes(StateMachineInterface $stateMachine, $name)
 {
     $state = $stateMachine->getState($name);
     /* @var $state \Finite\State\StateInterface */
     $data = array('shape' => $state->getType() != StateInterface::TYPE_NORMAL ? 'doublecircle' : 'circle', 'label' => $this->getNodeLabel($state));
     if ($stateMachine->getCurrentState() == $state && $this->configuration->markCurrentState()) {
         $data['fillcolor'] = $this->configuration->markCurrentState();
         $data['style'] = 'filled';
     }
     return $data;
 }