PHP Класс Sulu\Bundle\CategoryBundle\Category\CategoryManager

Наследование: implements Sulu\Bundle\CategoryBundle\Category\CategoryManagerInterface
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
$catTranslationEntityName
$categoryEntityName

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

Метод Описание
__construct ( Sulu\Bundle\CategoryBundle\Entity\CategoryRepositoryInterface $categoryRepository, Sulu\Bundle\CategoryBundle\Entity\CategoryMetaRepositoryInterface $categoryMetaRepository, Sulu\Bundle\CategoryBundle\Entity\CategoryTranslationRepositoryInterface $categoryTranslationRepository, Sulu\Component\Security\Authentication\UserRepositoryInterface $userRepository, Sulu\Bundle\CategoryBundle\Category\KeywordManagerInterface $keywordManager, Doctrine\ORM\EntityManagerInterface $em, Symfony\Component\EventDispatcher\EventDispatcherInterface $eventDispatcher )
delete ( $id )
find ( $parent = null, $depth = null, $sortBy = null, $sortOrder = null )
findById ( $id )
findByIds ( array $ids )
findByKey ( $key )
findChildren ( $key, $sortBy = null, $sortOrder = null )
findChildrenByParentId ( $parentId = null )
findChildrenByParentKey ( $parentKey = null )
getApiObject ( $category, string $locale ) : null | Category Returns an API-Object for a given category-entity. The API-Object wraps the entity and provides neat getters and setters. If the given object is already an API-object, the associated entity is used for wrapping.
getApiObjects ( $entities, $locale ) : array Returns an array of API-Objects for a given array of category-entities.
getFieldDescriptor ( $locale, $key )
getFieldDescriptors ( $locale )
save ( $data, $userId, $locale, $patch = false )

Приватные методы

Метод Описание
findOrCreateCategoryTranslation ( Sulu\Bundle\CategoryBundle\Entity\CategoryInterface $category, Category $categoryWrapper, string $locale ) : Sulu\Bundle\CategoryBundle\Entity\CategoryTranslationInterface Returns category-translation or create a new one.
getProperty ( array $data, string $key, string $default = null ) : string | null Return the value of a key in a given data-array.

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

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

public __construct ( Sulu\Bundle\CategoryBundle\Entity\CategoryRepositoryInterface $categoryRepository, Sulu\Bundle\CategoryBundle\Entity\CategoryMetaRepositoryInterface $categoryMetaRepository, Sulu\Bundle\CategoryBundle\Entity\CategoryTranslationRepositoryInterface $categoryTranslationRepository, Sulu\Component\Security\Authentication\UserRepositoryInterface $userRepository, Sulu\Bundle\CategoryBundle\Category\KeywordManagerInterface $keywordManager, Doctrine\ORM\EntityManagerInterface $em, Symfony\Component\EventDispatcher\EventDispatcherInterface $eventDispatcher )
$categoryRepository Sulu\Bundle\CategoryBundle\Entity\CategoryRepositoryInterface
$categoryMetaRepository Sulu\Bundle\CategoryBundle\Entity\CategoryMetaRepositoryInterface
$categoryTranslationRepository Sulu\Bundle\CategoryBundle\Entity\CategoryTranslationRepositoryInterface
$userRepository Sulu\Component\Security\Authentication\UserRepositoryInterface
$keywordManager Sulu\Bundle\CategoryBundle\Category\KeywordManagerInterface
$em Doctrine\ORM\EntityManagerInterface
$eventDispatcher Symfony\Component\EventDispatcher\EventDispatcherInterface

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

public delete ( $id )

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

public find ( $parent = null, $depth = null, $sortBy = null, $sortOrder = null )

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

public findById ( $id )

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

public findByIds ( array $ids )
$ids array

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

public findByKey ( $key )

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

public findChildren ( $key, $sortBy = null, $sortOrder = null )

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

public findChildrenByParentId ( $parentId = null )

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

public findChildrenByParentKey ( $parentKey = null )

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

Returns an API-Object for a given category-entity. The API-Object wraps the entity and provides neat getters and setters. If the given object is already an API-object, the associated entity is used for wrapping.
public getApiObject ( $category, string $locale ) : null | Category
$category
$locale string
Результат null | Sulu\Bundle\CategoryBundle\Api\Category

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

The returned array can contain null-values, if the given entities are not valid.
public getApiObjects ( $entities, $locale ) : array
$entities
$locale
Результат array

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

public getFieldDescriptor ( $locale, $key )

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

public getFieldDescriptors ( $locale )

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

public save ( $data, $userId, $locale, $patch = false )

Описание свойств

$catTranslationEntityName публичное статическое свойство

public static $catTranslationEntityName

$categoryEntityName публичное статическое свойство

public static $categoryEntityName