protected function findPlaces(Definition $definition, Marking $marking = null) { $places = array(); foreach ($definition->getPlaces() as $place) { $attributes = array(); if ($place === $definition->getInitialPlace()) { $attributes['style'] = 'filled'; } if ($marking && $marking->has($place)) { $attributes['color'] = '#FF0000'; $attributes['shape'] = 'doublecircle'; } $places[$place] = array('attributes' => $attributes); } return $places; }