CoolCMS API

CategoryCollectionTrait

Tags
template

Table of Contents

Properties

$categories  : Collection<int, TCategory>

Methods

addCategory()  : $this
categoryCollectionInit()  : void
clearCategories()  : $this
getCategories()  : Collection<int, TCategory>
getCategoryIds()  : array<string|int, int>
getFirstCategoryId()  : int|null
removeCategory()  : $this
setCategories()  : $this

Properties

Methods

addCategory()

public addCategory(TCategory $category) : $this
Parameters
$category : TCategory
Return values
$this

getCategories()

public getCategories() : Collection<int, TCategory>
Return values
Collection<int, TCategory>

getCategoryIds()

public getCategoryIds() : array<string|int, int>
Return values
array<string|int, int>

removeCategory()

public removeCategory(TCategory $category) : $this
Parameters
$category : TCategory
Return values
$this

setCategories()

public setCategories(Collection<int, TCategory>|array<int, TCategory> $categories) : $this
Parameters
$categories : Collection<int, TCategory>|array<int, TCategory>
Return values
$this
On this page

Search results