Method | Description | |
---|---|---|
delete ( integer $id ) | Deletes the category which is assigned to the given id. | |
find ( integer $parent = null, integer $depth = null, string | null $sortBy = null, string | null $sortOrder = null ) : Sulu\Bundle\CategoryBundle\Entity\CategoryInterface[] | Returns tags with a given parent and/or a given depth-level if no arguments passed returns all categories. | |
findById ( integer $id ) : Sulu\Bundle\CategoryBundle\Entity\CategoryInterface | Returns the category which is assigned to the given id. | |
findByIds ( array $ids ) : Sulu\Bundle\CategoryBundle\Entity\CategoryInterface[] | Returns an array of categories which are assigned to the given array of ids. | |
findByKey ( string $key ) : Sulu\Bundle\CategoryBundle\Entity\CategoryInterface | Returns the category which is assigned to the given key. | |
findChildren ( integer $key, string | null $sortBy = null, string | null $sortOrder = null ) : Sulu\Bundle\CategoryBundle\Entity\CategoryInterface[] | Returns the children for a given category. | |
findChildrenByParentId ( null $parentId = null ) : array | Returns the whole category graph. | |
findChildrenByParentKey ( null $parentKey = null ) : array | Returns the whole category graph. | |
getApiObject ( Sulu\Bundle\CategoryBundle\Entity\CategoryInterface $category, string $locale ) : Sulu\Bundle\CategoryBundle\Entity\CategoryInterface | Returns an API-Object for a given category-entity. The API-Object wraps the entity and provides neat getters and setters. | |
getApiObjects ( Sulu\Bundle\CategoryBundle\Entity\CategoryInterface[] $categories, string $locale ) : Sulu\Bundle\CategoryBundle\Entity\CategoryInterface | Same as getApiObject, but takes multiple category-entities. | |
getFieldDescriptor ( string $locale, string $key ) : |
Returns the FieldDescriptor for the given key. | |
getFieldDescriptors ( string $locale ) : |
Returns the FieldDescriptors for the categories. | |
save ( $data, $userId, $locale, boolean $patch = false ) : Sulu\Bundle\CategoryBundle\Entity\CategoryInterface | Creates or updates the given data as category in the given locale and return the saved category. |
public find ( integer $parent = null, integer $depth = null, string | null $sortBy = null, string | null $sortOrder = null ) : Sulu\Bundle\CategoryBundle\Entity\CategoryInterface[] | ||
$parent | integer | the id of the parent to filter for |
$depth | integer | 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[] |
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 search the children for |
$sortBy | string | null | column name to sort by |
$sortOrder | string | null | sort order |
return | Sulu\Bundle\CategoryBundle\Entity\CategoryInterface[] |
public findChildrenByParentId ( null $parentId = null ) : array | ||
$parentId | null | |
return | array |
public findChildrenByParentKey ( null $parentKey = null ) : array | ||
$parentKey | null | |
return | array |
public getApiObject ( Sulu\Bundle\CategoryBundle\Entity\CategoryInterface $category, string $locale ) : Sulu\Bundle\CategoryBundle\Entity\CategoryInterface | ||
$category | Sulu\Bundle\CategoryBundle\Entity\CategoryInterface | |
$locale | string | |
return | Sulu\Bundle\CategoryBundle\Entity\CategoryInterface |
public getApiObjects ( Sulu\Bundle\CategoryBundle\Entity\CategoryInterface[] $categories, string $locale ) : Sulu\Bundle\CategoryBundle\Entity\CategoryInterface | ||
$categories | Sulu\Bundle\CategoryBundle\Entity\CategoryInterface[] | |
$locale | string | |
return | Sulu\Bundle\CategoryBundle\Entity\CategoryInterface |
public getFieldDescriptor ( string $locale, string $key ) : |
||
$locale | string | |
$key | string | The key of the FieldDescriptor to return |
return |
public getFieldDescriptors ( string $locale ) : |
||
$locale | string | |
return |
public save ( $data, $userId, $locale, boolean $patch = false ) : Sulu\Bundle\CategoryBundle\Entity\CategoryInterface | ||
$data | ||
$userId | int Id of the user which is set as creator/changer. If null, the user of the request is set | |
$locale | ||
$patch | boolean | |
return | Sulu\Bundle\CategoryBundle\Entity\CategoryInterface |