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

Наследование: extends Sulu\Bundle\CoreBundle\Entity\ApiEntityWrapper
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
__construct ( Sulu\Bundle\CategoryBundle\Entity\CategoryInterface $category, $locale )
getChanged ( ) : string Returns the created date for the category.
getChanger ( ) : string Returns the changer of the category.
getChildren ( ) : Category[] Returns the children of a category.
getCreated ( ) : string Returns the created date for the category.
getCreator ( ) : string Returns the creator of the category.
getDefaultLocale ( ) : string Returns the default locale of the category.
getDescription ( ) : string Returns the description of the Category dependent on the locale.
getId ( ) : array Returns the id of the category.
getKey ( ) : string Returns the key of the category.
getLocale ( ) : string Returns the locale of the Category dependent on the existing translations and default locale.
getMedias ( ) : Media[] Returns the medias of the Category dependent on the locale.
getMediasRawData ( ) : string Returns the medias of the Category dependent on the locale.
getMeta ( ) : array Returns the name of the Category dependent on the locale.
getName ( ) : string Returns the name of the Category dependent on the locale.
getParent ( ) : null | Category Returns a parent category if one exists.
getParentId ( ) : null | Category Returns a the id of the parent category, if one exists.
setKey ( string $key ) : Category Sets the key of the category.
setMeta ( Sulu\Bundle\CategoryBundle\Entity\CategoryMetaInterface[] $metaEntities ) : Category Takes meta as array and sets it to the entity.
setParent ( Sulu\Bundle\CategoryBundle\Entity\CategoryInterface $parent ) : Category Sets a given category as the parent of the entity.
setTranslation ( Sulu\Bundle\CategoryBundle\Entity\CategoryTranslationInterface $translation ) Sets a translation to the entity.
toArray ( ) : array Returns an array representation of the object.

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

Метод Описание
getSingleMetaById ( $meta, $id ) : CollectionMeta Takes an array of CollectionMeta and returns a single meta for a given id.
getTranslation ( $withDefault = false ) : Sulu\Bundle\CategoryBundle\Entity\CategoryTranslationInterface Returns the translation with the current locale.
getTranslationByLocale ( string $locale ) : Sulu\Bundle\CategoryBundle\Entity\CategoryTranslationInterface Returns the translation with the given locale.
getUserFullName ( $user ) : string Takes a user entity and returns the fullname.

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

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

public __construct ( Sulu\Bundle\CategoryBundle\Entity\CategoryInterface $category, $locale )
$category Sulu\Bundle\CategoryBundle\Entity\CategoryInterface

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

Returns the created date for the category.
public getChanged ( ) : string
Результат string

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

Returns the changer of the category.
public getChanger ( ) : string
Результат string

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

Returns the children of a category.
public getChildren ( ) : Category[]
Результат Category[]

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

Returns the created date for the category.
public getCreated ( ) : string
Результат string

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

Returns the creator of the category.
public getCreator ( ) : string
Результат string

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

Returns the default locale of the category.
public getDefaultLocale ( ) : string
Результат string

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

Returns the description of the Category dependent on the locale.
public getDescription ( ) : string
Результат string

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

Returns the id of the category.
public getId ( ) : array
Результат array

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

Returns the key of the category.
public getKey ( ) : string
Результат string

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

Returns the locale of the Category dependent on the existing translations and default locale.
public getLocale ( ) : string
Результат string

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

Returns the medias of the Category dependent on the locale.
public getMedias ( ) : Media[]
Результат Sulu\Bundle\MediaBundle\Api\Media[]

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

Returns the medias of the Category dependent on the locale.
public getMediasRawData ( ) : string
Результат string

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

Returns the name of the Category dependent on the locale.
public getMeta ( ) : array
Результат array

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

Returns the name of the Category dependent on the locale.
public getName ( ) : string
Результат string

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

Returns a parent category if one exists.
public getParent ( ) : null | Category
Результат null | Category

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

This method is used to serialize the parent-id.
public getParentId ( ) : null | Category
Результат null | Category

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

Sets the key of the category.
public setKey ( string $key ) : Category
$key string
Результат Category

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

Takes meta as array and sets it to the entity.
public setMeta ( Sulu\Bundle\CategoryBundle\Entity\CategoryMetaInterface[] $metaEntities ) : Category
$metaEntities Sulu\Bundle\CategoryBundle\Entity\CategoryMetaInterface[]
Результат Category

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

Sets a given category as the parent of the entity.
public setParent ( Sulu\Bundle\CategoryBundle\Entity\CategoryInterface $parent ) : Category
$parent Sulu\Bundle\CategoryBundle\Entity\CategoryInterface
Результат Category

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

If no other translation was assigned before, the translation is added as default.
public setTranslation ( Sulu\Bundle\CategoryBundle\Entity\CategoryTranslationInterface $translation )
$translation Sulu\Bundle\CategoryBundle\Entity\CategoryTranslationInterface

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

Returns an array representation of the object.
public toArray ( ) : array
Результат array