PHP Interface Sulu\Bundle\CategoryBundle\Entity\CategoryRepositoryInterface

Inheritance: extends Sulu\Component\Persistence\Repository\RepositoryInterface
Exibir arquivo Open project: sulu/sulu Interface Usage Examples

Public Methods

Method Description
findCategories ( number $parent = null, number $depth = null, string | null $sortBy = null, string | null $sortOrder = null ) : Sulu\Bundle\CategoryBundle\Entity\CategoryInterface[] Returns all categories. Can be filtered with parent and depth.
findCategoriesByIds ( array $ids ) : Sulu\Bundle\CategoryBundle\Entity\CategoryInterface[] Returns an array of categories which are assigned to the given array of ids.
findCategoryById ( integer $id ) : Sulu\Bundle\CategoryBundle\Entity\CategoryInterface | null Returns the category which is assigned to the given id.
findCategoryByIds ( array $ids ) : Sulu\Bundle\CategoryBundle\Entity\CategoryInterface[] Finds the categories with the given ids.
findCategoryByKey ( string $key ) : Sulu\Bundle\CategoryBundle\Entity\CategoryInterface | null Returns the category which is assigned to the given key.
findCategoryIdsBetween ( $fromIds, $toIds ) : array Returns an array of ids of categories which are positioned (exlusive) between a category which is assigned to one of the entries of the fromIds array and a category which is assigned to one of the entries of the toIds array.
findChildren ( integer $key, string | null $sortBy = null, string | null $sortOrder = null ) : Sulu\Bundle\CategoryBundle\Entity\CategoryInterface[] Returns the children for a given category.
findChildrenCategoriesByParentId ( null $parentId = null ) : Sulu\Bundle\CategoryBundle\Entity\CategoryInterface[] Returns the whole category graph. Children are available through children-properties of parents.
findChildrenCategoriesByParentKey ( null $parentKey = null ) : Sulu\Bundle\CategoryBundle\Entity\CategoryInterface[] Returns the whole category graph. Children are available through children-properties of parents.
isCategoryId ( $id ) : boolean Returns true if the given id is assigned to an existing category.
isCategoryKey ( $key ) : boolean Returns true if the given key is assigned to an existing category.

Method Details

findCategories() public method

Returns all categories. Can be filtered with parent and depth.
Deprecation: Use ::findChildrenCategoriesByParentId instead
public findCategories ( number $parent = null, number $depth = null, string | null $sortBy = null, string | null $sortOrder = null ) : Sulu\Bundle\CategoryBundle\Entity\CategoryInterface[]
$parent number the id of the parent to filter for
$depth number the depth-level to filter for
$sortBy string | null column name to sort the categories by
$sortOrder string | null sort order
return Sulu\Bundle\CategoryBundle\Entity\CategoryInterface[]

findCategoriesByIds() public method

Returns an array of categories which are assigned to the given array of ids.
public findCategoriesByIds ( array $ids ) : Sulu\Bundle\CategoryBundle\Entity\CategoryInterface[]
$ids array
return Sulu\Bundle\CategoryBundle\Entity\CategoryInterface[]

findCategoryById() public method

If no respective category is found, null is returned.
public findCategoryById ( integer $id ) : Sulu\Bundle\CategoryBundle\Entity\CategoryInterface | null
$id integer
return Sulu\Bundle\CategoryBundle\Entity\CategoryInterface | null

findCategoryByIds() public method

Finds the categories with the given ids.
Deprecation: Use ::findCategoriesByIds instead
public findCategoryByIds ( array $ids ) : Sulu\Bundle\CategoryBundle\Entity\CategoryInterface[]
$ids array The ids to load
return Sulu\Bundle\CategoryBundle\Entity\CategoryInterface[]

findCategoryByKey() public method

If no respective category is found, null is returned.
public findCategoryByKey ( string $key ) : Sulu\Bundle\CategoryBundle\Entity\CategoryInterface | null
$key string
return Sulu\Bundle\CategoryBundle\Entity\CategoryInterface | null

findCategoryIdsBetween() public method

Start- and end-points of a path are not returned.
public findCategoryIdsBetween ( $fromIds, $toIds ) : array
$fromIds array Start-points of the paths which are processed
$toIds array End-points of the paths which are processed
return array

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[]

findChildrenCategoriesByParentId() public method

If parentId is set, only the sub-graph below the category which is assigned to the given id is returned.
public findChildrenCategoriesByParentId ( null $parentId = null ) : Sulu\Bundle\CategoryBundle\Entity\CategoryInterface[]
$parentId null
return Sulu\Bundle\CategoryBundle\Entity\CategoryInterface[]

findChildrenCategoriesByParentKey() public method

If parentKey is set, only the sub-graph below the category which is assigned to the given key is returned.
public findChildrenCategoriesByParentKey ( null $parentKey = null ) : Sulu\Bundle\CategoryBundle\Entity\CategoryInterface[]
$parentKey null
return Sulu\Bundle\CategoryBundle\Entity\CategoryInterface[]

isCategoryId() public method

Returns true if the given id is assigned to an existing category.
public isCategoryId ( $id ) : boolean
$id
return boolean

isCategoryKey() public method

Returns true if the given key is assigned to an existing category.
public isCategoryKey ( $key ) : boolean
$key
return boolean