TagCollectionTrait
Tags
Table of Contents
Properties
- $tags : Collection<int, TTag>
Methods
- addTag() : $this
- clearTags() : $this
- getTagIds() : array<int, int|null>
- getTags() : Collection<int, TTag>
- removeTag() : $this
- setTags() : $this
- tagCollectionInit() : void
Properties
$tags
protected
Collection<int, TTag>
$tags
Methods
addTag()
public
addTag(TTag $tag) : $this
Parameters
- $tag : TTag
Return values
$thisclearTags()
public
clearTags() : $this
Return values
$thisgetTagIds()
public
getTagIds() : array<int, int|null>
Return values
array<int, int|null> —ids of the attached tags (getId() is ?int)
getTags()
public
getTags() : Collection<int, TTag>
Return values
Collection<int, TTag>removeTag()
public
removeTag(TTag $tag) : $this
Parameters
- $tag : TTag
Return values
$thissetTags()
public
setTags(Collection<int, TTag>|array<int, TTag> $tags) : $this
Parameters
- $tags : Collection<int, TTag>|array<int, TTag>
Return values
$thistagCollectionInit()
public
tagCollectionInit() : void