/** * @param \Orm\Zed\Category\Persistence\SpyCategoryNode $node * * @return void */ protected function addClosureConnections(SpyCategoryNode $node) { $descendantPaths = $this->queryContainer->queryDescendant($node->getPrimaryKey())->find(); foreach ($descendantPaths as $path) { $attributes = ['color' => '#ff0000']; $this->graph->addEdge($this->getNodeHash($node), $this->getNodeHash($path->getDescendantNode()), $attributes); } }