PHP Class Sulu\Bundle\TagBundle\Tag\TagManager

Inheritance: implements Sulu\Bundle\TagBundle\Tag\TagManagerInterface
Afficher le fichier Open project: sulu/sulu

Protected Properties

Свойство Type Description
$contactEntityName
$fieldDescriptors Sulu\Component\Rest\ListBuilder\Doctrine\FieldDescriptor\DoctrineFieldDescriptor[] Describes the fields, which are handled by this controller.
$tagEntityName
$userEntityName

Méthodes publiques

Méthode Description
__construct ( Sulu\Bundle\TagBundle\Tag\TagRepositoryInterface $tagRepository, Sulu\Component\Security\Authentication\UserRepositoryInterface $userRepository, Doctrine\Common\Persistence\ObjectManager $em, Symfony\Component\EventDispatcher\EventDispatcherInterface $eventDispatcher )
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 ( $name, $userId )
getFieldDescriptor ( $key )
getFieldDescriptors ( )
merge ( number $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 ( $data, $userId, $id = null )

Private Methods

Méthode Description
initializeFieldDescriptors ( )

Method Details

__construct() public méthode

public __construct ( Sulu\Bundle\TagBundle\Tag\TagRepositoryInterface $tagRepository, Sulu\Component\Security\Authentication\UserRepositoryInterface $userRepository, Doctrine\Common\Persistence\ObjectManager $em, Symfony\Component\EventDispatcher\EventDispatcherInterface $eventDispatcher )
$tagRepository Sulu\Bundle\TagBundle\Tag\TagRepositoryInterface
$userRepository Sulu\Component\Security\Authentication\UserRepositoryInterface
$em Doctrine\Common\Persistence\ObjectManager
$eventDispatcher Symfony\Component\EventDispatcher\EventDispatcherInterface

delete() public méthode

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

findAll() public méthode

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

findById() public méthode

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

findByName() public méthode

Loads the tag with the given name.
public findByName ( $name ) : Tag
$name
Résultat Sulu\Bundle\TagBundle\Entity\Tag

findOrCreateByName() public méthode

public findOrCreateByName ( $name, $userId )

getFieldDescriptor() public méthode

public getFieldDescriptor ( $key )

getFieldDescriptors() public méthode

public getFieldDescriptors ( )

merge() public méthode

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

resolveTagIds() public méthode

Resolves tag ids to names.
public resolveTagIds ( $tagIds ) : array
$tagIds
Résultat array

resolveTagNames() public méthode

Resolves tag names to ids.
public resolveTagNames ( $tagNames ) : array
$tagNames
Résultat array

save() public méthode

public save ( $data, $userId, $id = null )

Property Details

$contactEntityName protected_oe static_oe property

protected static $contactEntityName

$fieldDescriptors protected_oe property

Describes the fields, which are handled by this controller.
protected DoctrineFieldDescriptor[],Sulu\Component\Rest\ListBuilder\Doctrine\FieldDescriptor $fieldDescriptors
Résultat Sulu\Component\Rest\ListBuilder\Doctrine\FieldDescriptor\DoctrineFieldDescriptor[]

$tagEntityName protected_oe static_oe property

protected static $tagEntityName

$userEntityName protected_oe static_oe property

protected static $userEntityName