Exemple #1
0
 public function addChild(Category $parent, $title, $type)
 {
     $category = new Category();
     $category->setAdministration($parent->getAdministration());
     $category->setTitle($title);
     $category->setType($type);
     $category->setParent($parent);
     $parent->getChildren()->add($category);
     return $category;
 }