PHP Class Sulu\Bundle\TagBundle\Tag\TagManager

Inheritance: implements Sulu\Bundle\TagBundle\Tag\TagManagerInterface
Datei anzeigen Open project: sulu/sulu

Protected Properties

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

Public Methods

Method 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

Method Description
initializeFieldDescriptors ( )

Method Details

__construct() public method

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 method

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

findAll() public method

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

findById() public method

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

findByName() public method

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

findOrCreateByName() public method

public findOrCreateByName ( $name, $userId )

getFieldDescriptor() public method

public getFieldDescriptor ( $key )

getFieldDescriptors() public method

public getFieldDescriptors ( )

merge() public method

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
return Sulu\Bundle\TagBundle\Entity\Tag The new Tag, which is valid for all given tags

resolveTagIds() public method

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

resolveTagNames() public method

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

save() public method

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
return 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