CategoryCollectionTrait
-
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
$categories
protected
Collection<int, TCategory>
$categories
addCategory()
public
addCategory(TCategory $category) : $this
Parameters
-
$category
: TCategory
-
categoryCollectionInit()
public
categoryCollectionInit() : void
clearCategories()
public
clearCategories() : $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>
getFirstCategoryId()
public
getFirstCategoryId() : int|null
removeCategory()
public
removeCategory(TCategory $category) : $this
Parameters
-
$category
: TCategory
-
setCategories()
public
setCategories(Collection<int, TCategory>|array<int, TCategory> $categories) : $this
Parameters
-
$categories
: Collection<int, TCategory>|array<int, TCategory>
-