PHP 인터페이스 Sulu\Bundle\TagBundle\Tag\TagManagerInterface

The TagManager is responsible for the centralized management of our tags.
파일 보기 프로젝트 열기: sulu/sulu 0 사용 예제들

공개 메소드들

메소드 설명
delete ( number $id ) Deletes the given Tag.
findAll ( ) : Tag[] Loads all the tags managed in this system.
findById ( $id ) : Tag Loads the tag with the given id.
findByName ( $name ) : Tag Loads the tag with the given name.
findOrCreateByName ( string $name, integer $userId ) : Tag Loads the tag with the given name, or creates it, if it does not exist.
getFieldDescriptor ( string $key ) : Sulu\Component\Rest\ListBuilder\FieldDescriptor\DoctrineFieldDescriptor Returns the FieldDescriptor for the given key.
getFieldDescriptors ( ) : Sulu\Component\Rest\ListBuilder\FieldDescriptor\DoctrineFieldDescriptor[] Returns the FieldDescriptors for the products.
merge ( array $srcTagIds, number $destTagId ) : Tag Merges the source tag into the destination tag.
resolveTagIds ( $tagIds ) : array Resolves tag ids to names.
resolveTagNames ( $tagNames ) : array Resolves tag names to ids.
save ( array $data, integer $userId, number | null $id = null ) Saves the given Tag.

메소드 상세

delete() 공개 메소드

Deletes the given Tag.
public delete ( number $id )
$id number The tag to delete

findAll() 공개 메소드

Loads all the tags managed in this system.
public findAll ( ) : Tag[]
리턴 Sulu\Bundle\TagBundle\Entity\Tag[]

findById() 공개 메소드

Loads the tag with the given id.
public findById ( $id ) : Tag
$id number The id of the tag
리턴 Sulu\Bundle\TagBundle\Entity\Tag

findByName() 공개 메소드

Loads the tag with the given name.
public findByName ( $name ) : Tag
$name
리턴 Sulu\Bundle\TagBundle\Entity\Tag

findOrCreateByName() 공개 메소드

Loads the tag with the given name, or creates it, if it does not exist.
public findOrCreateByName ( string $name, integer $userId ) : Tag
$name string The name to find or create
$userId integer The id of the user who tries to find a tag
리턴 Sulu\Bundle\TagBundle\Entity\Tag

getFieldDescriptor() 공개 메소드

Returns the FieldDescriptor for the given key.
public getFieldDescriptor ( string $key ) : Sulu\Component\Rest\ListBuilder\FieldDescriptor\DoctrineFieldDescriptor
$key string The key of the FieldDescriptor to return
리턴 Sulu\Component\Rest\ListBuilder\FieldDescriptor\DoctrineFieldDescriptor

getFieldDescriptors() 공개 메소드

Returns the FieldDescriptors for the products.
public getFieldDescriptors ( ) : Sulu\Component\Rest\ListBuilder\FieldDescriptor\DoctrineFieldDescriptor[]
리턴 Sulu\Component\Rest\ListBuilder\FieldDescriptor\DoctrineFieldDescriptor[]

merge() 공개 메소드

The source tag will be deleted.
public merge ( array $srcTagIds, number $destTagId ) : Tag
$srcTagIds array The source tags, which will be removed afterwards
$destTagId number The destination tag, which will replace the source tag
리턴 Sulu\Bundle\TagBundle\Entity\Tag The new Tag, which is valid for both given tags

resolveTagIds() 공개 메소드

Resolves tag ids to names.
public resolveTagIds ( $tagIds ) : array
$tagIds
리턴 array

resolveTagNames() 공개 메소드

Resolves tag names to ids.
public resolveTagNames ( $tagNames ) : array
$tagNames
리턴 array

save() 공개 메소드

Saves the given Tag.
public save ( array $data, integer $userId, number | null $id = null )
$data array The data of the tag to save
$userId integer The id of the user, who is doing this change
$id number | null The id for saving the tag (optional)