CoolCMS API

TagCollectionTrait

Tags
template

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

Methods

addTag()

public addTag(TTag $tag) : $this
Parameters
$tag : TTag
Return values
$this

getTagIds()

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
$this

setTags()

public setTags(Collection<int, TTag>|array<int, TTag> $tags) : $this
Parameters
$tags : Collection<int, TTag>|array<int, TTag>
Return values
$this
On this page

Search results