Sulu\Bundle\CategoryBundle\Entity\CategoryRepositoryInterface::findChildren PHP Method

findChildren() public method

Returns the children for a given category.
Deprecation: Use ::findChildrenCategoriesByParentKey instead
public findChildren ( integer $key, string | null $sortBy = null, string | null $sortOrder = null ) : Sulu\Bundle\CategoryBundle\Entity\CategoryInterface[]
$key integer the key of the category to return the children for
$sortBy string | null column name to sort by
$sortOrder string | null sort order
return Sulu\Bundle\CategoryBundle\Entity\CategoryInterface[]
    public function findChildren($key, $sortBy = null, $sortOrder = null);

Usage Example

Exemplo n.º 1
0
 /**
  * {@inheritdoc}
  */
 public function findChildren($key, $sortBy = null, $sortOrder = null)
 {
     @trigger_error(__METHOD__ . '() is deprecated since version 1.4 and will be removed in 2.0. Use findChildrenByParentKey() instead.', E_USER_DEPRECATED);
     return $this->categoryRepository->findChildren($key, $sortBy, $sortOrder);
 }