You are here

private function GraphvizDumper::addNodes in Service Container 7

Same name and namespace in other branches
  1. 7.2 modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Dumper/GraphvizDumper.php \Symfony\Component\DependencyInjection\Dumper\GraphvizDumper::addNodes()

Returns all nodes.

Return value

string A string representation of all nodes

1 call to GraphvizDumper::addNodes()
GraphvizDumper::dump in modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Dumper/GraphvizDumper.php
Dumps the service container as a graphviz graph.

File

modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Dumper/GraphvizDumper.php, line 94

Class

GraphvizDumper
GraphvizDumper dumps a service container as a graphviz file.

Namespace

Symfony\Component\DependencyInjection\Dumper

Code

private function addNodes() {
  $code = '';
  foreach ($this->nodes as $id => $node) {
    $aliases = $this
      ->getAliases($id);
    $code .= sprintf("  node_%s [label=\"%s\\n%s\\n\", shape=%s%s];\n", $this
      ->dotize($id), $id . ($aliases ? ' (' . implode(', ', $aliases) . ')' : ''), $node['class'], $this->options['node']['shape'], $this
      ->addAttributes($node['attributes']));
  }
  return $code;
}