for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of the Sonata Project package.
*
* (c) Thomas Rabaix <[email protected]>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Sonata\MediaBundle\Model;
use Sonata\ClassificationBundle\Model\CategoryManagerInterface as ManagerInterface;
/**
* @author Joao Albuquerque <[email protected]>
* @author Christian Gripp <[email protected]>
final class CategoryManager implements CategoryManagerInterface
{
* @var ManagerInterface
private $categoryManager;
* @param ManagerInterface $categoryManager
public function __construct(ManagerInterface $categoryManager)
$this->categoryManager = $categoryManager;
}
* {@inheritdoc}
public function getRootCategory($context)
return $this->categoryManager->getRootCategory($context);
public function getRootCategories($loadChildren = true)
return $this->categoryManager->getRootCategories($loadChildren);
public function find($categoryId)
return $this->categoryManager->find($categoryId);
public function findBy(array $criteria)
return $this->categoryManager->findBy($criteria);
public function create()
return $this->categoryManager->create();
public function save($category)
$this->categoryManager->save($category);