\Charcoal\ObjectCategoryTrait

Summary

Methods
Properties
Constants
setCategoryItemType()
categoryItemType()
numCategoryItems()
hasCategoryItems()
categoryItems()
loadCategoryItems()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$categoryItemType
$categoryItems
N/A

Properties

$categoryItemType

$categoryItemType : string

Type

string

$categoryItems

$categoryItems : \Charcoal\Object\Collection

Type

\Charcoal\Object\Collection

Methods

setCategoryItemType()

setCategoryItemType(string  $type) : \Charcoal\Object\CategoryInterface

Parameters

string $type

The category item type.

Throws

\InvalidArgumentException

If the type argument is not a string.

Returns

\Charcoal\Object\CategoryInterface

Chainable

categoryItemType()

categoryItemType() : string

Throws

\Exception

If no item type was previously set.

Returns

string

numCategoryItems()

numCategoryItems() : integer

Returns

integer

hasCategoryItems()

hasCategoryItems() : boolean

Returns

boolean

categoryItems()

categoryItems() : \Charcoal\Object\Collection

Returns

\Charcoal\Object\Collection —

A list of CategorizableInterface objects

loadCategoryItems()

loadCategoryItems() : \Charcoal\Object\Collection

Returns

\Charcoal\Object\Collection