Example #1
0
 /**
  * {@inheritdoc}
  */
 public function findRoot()
 {
     $root = new Category();
     $root->setChildren($this->findRoots());
     return $root;
 }
Example #2
0
 /**
  * @return Category
  */
 protected function getCategory()
 {
     $category = new Category();
     $category->setPosts(new ArrayCollection([$this->createPost(Post::PUBLISHED), $this->createPost(Post::DRAFT), $this->createPost(Post::PUBLISHED)]));
     return $category;
 }