Пример #1
0
 /**
  * {@inheritdoc}
  */
 public function getTree($slug)
 {
     $config = $this->getTreeConfig($slug);
     if (null === $config) {
         throw new TreeNotFoundException();
     }
     $tree = $this->treeManager->findTreeBySlug($config->getSlug());
     if (null === $tree) {
         $tree = $this->treeManager->create();
         $tree->setSlug($config->getSlug());
         $this->treeManager->add($tree);
     }
     return $tree;
 }