PHP Class Pimcore\Model\Element\Tag\Dao

Inheritance: extends Pimcore\Model\Dao\AbstractDao
Afficher le fichier Open project: pimcore/pimcore

Méthodes publiques

Méthode Description
addTagToElement ( $cType, $cId )
batchAssignTagsToElement ( $cType, array $cIds, array $tagIds, $replace )
delete ( ) : void Deletes object from database
getById ( $id )
getElementsForTag ( Tag $tag, string $type, array $subtypes = [], array $classNames = [], boolean $considerChildTags = false ) : array Retrieves all elements that have a specific tag or one of its child tags assigned
getTagsForElement ( $cType, $cId ) : Tag[]
removeTagFromElement ( $cType, $cId )
save ( ) : void Save object to database
setTagsForElement ( $cType, $cId, array $tags )

Méthodes protégées

Méthode Description
doAddTagToElement ( $tagId, $cType, $cId )

Method Details

addTagToElement() public méthode

public addTagToElement ( $cType, $cId )
$cType
$cId

batchAssignTagsToElement() public méthode

public batchAssignTagsToElement ( $cType, array $cIds, array $tagIds, $replace )
$cIds array
$tagIds array

delete() public méthode

Deletes object from database
public delete ( ) : void
Résultat void

doAddTagToElement() protected méthode

protected doAddTagToElement ( $tagId, $cType, $cId )

getById() public méthode

public getById ( $id )
$id

getElementsForTag() public méthode

Retrieves all elements that have a specific tag or one of its child tags assigned
public getElementsForTag ( Tag $tag, string $type, array $subtypes = [], array $classNames = [], boolean $considerChildTags = false ) : array
$tag Pimcore\Model\Element\Tag The tag to search for
$type string The type of elements to search for: 'document', 'asset' or 'object'
$subtypes array Filter by subtypes, eg. page, object, email, folder etc.
$classNames array For objects only: filter by classnames
$considerChildTags boolean Look for elements having one of $tag's children assigned
Résultat array

getTagsForElement() public méthode

public getTagsForElement ( $cType, $cId ) : Tag[]
$cType
$cId
Résultat Pimcore\Model\Element\Tag[]

removeTagFromElement() public méthode

public removeTagFromElement ( $cType, $cId )

save() public méthode

Save object to database
public save ( ) : void
Résultat void

setTagsForElement() public méthode

public setTagsForElement ( $cType, $cId, array $tags )
$tags array