CategoryListItem

Class CategoryListItem

This class represents a flattened category with just its essential data. The object stores language specific data only in one language and is mainly used inside a CategoryListItemCollection for displaying among other CategoryListItems in a list. The class provides only read access and can not use to manipulate and persist categories data.

category

System

package

Category

subpackage

Entities

Methods

CategoryListItem constructor.

__construct(\CategoryRepositoryInterface $categoryRepo, \CategoryListProviderInterface $categoryListProvider, \IdType $categoryId, \IdType $parentId, \BoolType $active, \StringType $name, \StringType $headingTitle, \StringType $description, \StringType $urlKeywords, \StringType $image, \StringType $imageAltText, \StringType $icon) 

Arguments

$categoryRepo

\CategoryRepositoryInterface

Category repository.

$categoryListProvider

\CategoryListProviderInterface

Category list provider.

$categoryId

\IdType

Category ID.

$parentId

\IdType

Category parent ID.

$active

\BoolType

Is category active?

$name

\StringType

Category name.

$headingTitle

\StringType

Category heading title.

$description

\StringType

Category description.

$urlKeywords

\StringType

URL keywords.

$image

\StringType

Category image.

$imageAltText

\StringType

Image alternative text.

$icon

\StringType

Category icon.

Returns the category ID.

getCategoryId() : integer

Response

integer

Returns the category object.

getCategoryObject() : \CategoryInterface

Returns the category description.

getDescription() : string

Response

string

Returns the category heading title.

getHeadingTitle() : string

Response

string

Returns the category icon.

getIcon() : string

Response

string

Returns the category image.

getImage() : string

Response

string

Returns the image alternative text.

getImageAltText() : string

Response

string

Returns the category name.

getName() : string

Response

string

Returns the category parent ID.

getParentId() : integer

Response

integer

Returns the subcategory collection.

getSubcategoryList() : \CategoryListItemCollection

Returns the URL keywords.

getUrlKeywords() : string

Response

string

Returns the value whether the category is active.

isActive() : boolean

Response

boolean

Properties

Category repository.

categoryRepo : \CategoryRepositoryInterface

Category list provider.

categoryListProvider : \CategoryListProviderInterface

Category ID.

categoryId : integer
var

Type(s)

integer

Category parent ID.

parentId : integer
var

Type(s)

integer

Value whether category is active?

active : boolean
var

Type(s)

boolean

Category name.

name : string
var

Type(s)

string

Category heading title.

headingTitle : string
var

Type(s)

string

Category description.

description : string
var

Type(s)

string

Category URL keywords.

urlKeywords : string
var

Type(s)

string

Category image.

image : string
var

Type(s)

string

Image alternative text.

imageAltText : string
var

Type(s)

string

Category icon file.

icon : string
var

Type(s)

string