PHP 클래스 Sulu\Bundle\CategoryBundle\Api\Category

상속: extends Sulu\Bundle\CoreBundle\Entity\ApiEntityWrapper
파일 보기 프로젝트 열기: sulu/sulu 1 사용 예제들

공개 메소드들

메소드 설명
__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