PHP Интерфейс Sulu\Bundle\CategoryBundle\Entity\CategoryRepositoryInterface

Наследование: extends Sulu\Component\Persistence\Repository\RepositoryInterface
Показать файл Открыть проект Примеры использования интерфейса

Открытые методы

Метод Описание
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.

Описание методов

findCategories() публичный Метод

Returns all categories. Can be filtered with parent and depth.
Устаревший: 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
Результат Sulu\Bundle\CategoryBundle\Entity\CategoryInterface[]

findCategoriesByIds() публичный Метод

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
Результат Sulu\Bundle\CategoryBundle\Entity\CategoryInterface[]

findCategoryById() публичный Метод

If no respective category is found, null is returned.
public findCategoryById ( integer $id ) : Sulu\Bundle\CategoryBundle\Entity\CategoryInterface | null
$id integer
Результат Sulu\Bundle\CategoryBundle\Entity\CategoryInterface | null

findCategoryByIds() публичный Метод

Finds the categories with the given ids.
Устаревший: Use ::findCategoriesByIds instead
public findCategoryByIds ( array $ids ) : Sulu\Bundle\CategoryBundle\Entity\CategoryInterface[]
$ids array The ids to load
Результат Sulu\Bundle\CategoryBundle\Entity\CategoryInterface[]

findCategoryByKey() публичный Метод

If no respective category is found, null is returned.
public findCategoryByKey ( string $key ) : Sulu\Bundle\CategoryBundle\Entity\CategoryInterface | null
$key string
Результат Sulu\Bundle\CategoryBundle\Entity\CategoryInterface | null

findCategoryIdsBetween() публичный Метод

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
Результат array

findChildren() публичный Метод

Returns the children for a given category.
Устаревший: 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
Результат Sulu\Bundle\CategoryBundle\Entity\CategoryInterface[]

findChildrenCategoriesByParentId() публичный Метод

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
Результат Sulu\Bundle\CategoryBundle\Entity\CategoryInterface[]

findChildrenCategoriesByParentKey() публичный Метод

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
Результат Sulu\Bundle\CategoryBundle\Entity\CategoryInterface[]

isCategoryId() публичный Метод

Returns true if the given id is assigned to an existing category.
public isCategoryId ( $id ) : boolean
$id
Результат boolean

isCategoryKey() публичный Метод

Returns true if the given key is assigned to an existing category.
public isCategoryKey ( $key ) : boolean
$key
Результат boolean