src/Core/Helper/State/Renderer.php
public function renderDot(StateCollection $stateCollection)
    {
        // define the graph
        $graph = 'digraph ' . 'test'
            . ' { dpi="56";compound="true";fontname="Arial";margin="";nodesep="0.6";rankdir="TD";ranksep="0.4";'
            . PHP_EOL;

        // add all states to the graph
        foreach ($stateCollection as $state) {
            $nodeRenderer = $this->getNodeRendererByStateName($state->getKey());
            $graph .= ' ' . $nodeRenderer->render($state);
        }

        // add all transitions to the graph
        foreach ($stateCollection as $state) {
            $nodeRenderer = $this->getTransitionRendererByStateName($state->getKey());
            $graph .= ' ' . $nodeRenderer->render($state);
        }

        $graph .= '}' . PHP_EOL;


        return $graph;
    }
public function renderDot(StateCollection $stateCollection)
    {
        // define the graph
        $graph = 'digraph ' . 'test'
            . ' { dpi="56";compound="true";fontname="Arial";margin="";nodesep="0.6";rankdir="TD";ranksep="0.4";'
            . PHP_EOL;

        // add all states to the graph
        foreach ($stateCollection as $state) {
            $nodeRenderer = $this->getNodeRendererByStateName($state->getKey());
            $graph .= ' ' . $nodeRenderer->render($state);
        }

        // add all transitions to the graph
        foreach ($stateCollection as $state) {
            $nodeRenderer = $this->getTransitionRendererByStateName($state->getKey());
            $graph .= ' ' . $nodeRenderer->render($state);
        }

        $graph .= '}' . PHP_EOL;


        return $graph;
    }
public function renderDot ( StateCollection $ stateCollection ) { // define the graph $ graph = 'digraph ' . 'test' . ' { dpi="56";compound="true";fontname="Arial";margin="";nodesep="0.6";rankdir="TD";ranksep="0.4";' . PHP_EOL ; // add all states to the graph foreach ( $ stateCollection as $ state ) { $ nodeRenderer = $ this -> getNodeRendererByStateName ( $ state -> getKey ( ) ) ; $ graph .= ' ' . $ nodeRenderer -> render ( $ state ) ; } // add all transitions to the graph foreach ( $ stateCollection as $ state ) { $ nodeRenderer = $ this -> getTransitionRendererByStateName ( $ state -> getKey ( ) ) ; $ graph .= ' ' . $ nodeRenderer -> render ( $ state ) ; } $ graph .= '}' . PHP_EOL ; return $ graph ; }
Creates a dot graph for a process

@param StateCollection $stateCollection
@return string A dot graph
Creates a dot graph for a process