/** * @return bool */ public function render() { $rootNode = $this->queryContainer->queryRootNode()->findOne(); if ($rootNode) { $this->renderChildren($rootNode); return $this->graph->render('svg'); } return false; }
/** * @param array $dependencyTree * * @return string */ public function build(array $dependencyTree) { foreach ($dependencyTree as $dependency) { $this->graph->addNode($dependency[DependencyTree::META_BUNDLE], $this->getNodeAttributes($dependency)); $this->graph->addNode($dependency[DependencyTree::META_FOREIGN_BUNDLE], $this->getForeignNodeAttributes($dependency)); } foreach ($dependencyTree as $dependency) { $this->graph->addEdge($dependency[DependencyTree::META_BUNDLE], $dependency[DependencyTree::META_FOREIGN_BUNDLE], $this->getEdgeAttributes($dependency)); } return $this->graph->render('svg'); }
/** * @param array $dependencyTree * * @return string */ public function build(array $dependencyTree) { foreach ($dependencyTree as $dependency) { $this->graph->addNode($dependency[DependencyTree::META_BUNDLE], $this->getFromAttributes($dependency)); if (!empty($dependency[DependencyTree::META_COMPOSER_NAME])) { $this->graph->addNode($dependency[DependencyTree::META_COMPOSER_NAME], $this->getToAttributes($dependency)); } } foreach ($dependencyTree as $dependency) { if (empty($dependency[DependencyTree::META_COMPOSER_NAME])) { continue; } $this->graph->addEdge($dependency[DependencyTree::META_BUNDLE], $dependency[DependencyTree::META_COMPOSER_NAME], $this->getEdgeAttributes($dependency)); } return $this->graph->render('svg'); }
/** * @param \Spryker\Zed\Oms\Business\Process\ProcessInterface $process * @param string|null $highlightState * @param string|null $format * @param int|null $fontSize * * @return string */ public function draw(ProcessInterface $process, $highlightState = null, $format = null, $fontSize = null) { $this->init($format, $fontSize); $this->drawClusters($process); $this->drawStates($process, $highlightState); $this->drawTransitions($process); return $this->graph->render($this->format); }
/** * @param array $dependencyTree * * @return string */ public function build(array $dependencyTree) { $this->buildGraph($dependencyTree); return $this->graph->render('svg'); }