CategoryServiceTrait

Trait for component categories service.

since

4.0.0

package

Joomla CMS

Methods

countItems

Adds Count Items for Category Manager.

countItems(\stdClass||string|int items,  section) : 
since

4.0.0

throws

Exception

Arguments

items

array<string|int, stdClass>The category objects

section

stringThe section

Response

void

getCategory

Returns the category service.

getCategory(mixed||string|int options = [],  section = '') : \Joomla\CMS\Categories\CategoryInterface
since

4.0.0

throws

SectionNotFoundException

Arguments

options

array<string|int, mixed>The options

section

stringThe section

Response

CategoryInterface

getStateColumnForSection

Returns the state column for the count items functions for the given section.

getStateColumnForSection( section = null) : string|null
since

4.0.0

Arguments

section

stringThe section

Response

string|null

getTableNameForSection

Returns the table for the count items functions for the given section.

getTableNameForSection( section = null) : string|null
since

4.0.0

Arguments

section

stringThe section

Response

string|null

prepareForm

Prepares the category form

prepareForm(\Joomla\CMS\Form\Form form, array|object data) : 

Arguments

form

FormThe form to change

data

array<string|int, mixed>|objectThe form data

Response

void

setCategoryFactory

Sets the internal category factory.

setCategoryFactory(\Joomla\CMS\Categories\CategoryFactoryInterface categoryFactory) : 
since

4.0.0

Arguments

categoryFactory

CategoryFactoryInterfaceThe categories factory

Response

void

Properties

categoryFactory

The categories factory

since

4.0.0

Type(s)

CategoryFactoryInterface