Class 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.

Methods summary

public __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 )

CategoryListItem constructor.

public getCategoryId( void ) : integer

Returns the category ID.

public getParentId( void ) : integer

Returns the category parent ID.

public isActive( void ) : boolean

Returns the value whether the category is active.

public getName( void ) : string

Returns the category name.

public getHeadingTitle( void ) : string

Returns the category heading title.

public getDescription( void ) : string

Returns the category description.

public getUrlKeywords( void ) : string

Returns the URL keywords.

public getImage( void ) : string

Returns the category image.

public getImageAltText( void ) : string

Returns the image alternative text.

public getIcon( void ) : string

Returns the category icon.

public getCategoryObject( void ) : CategoryInterface

Returns the category object.

public getSubcategoryList( void ) : CategoryListItemCollection

Returns the subcategory collection.

Properties summary

protected $categoryRepo : CategoryRepositoryInterface

Category repository.


		
protected $categoryListProvider : CategoryListProviderInterface

Category list provider.


		
protected $categoryId : integer

Category ID.


		
protected $parentId : integer

Category parent ID.


		
protected $active : boolean

Value whether category is active?


		
protected $name : string

Category name.


		
protected $headingTitle : string

Category heading title.


		
protected $description : string

Category description.


		
protected $urlKeywords : string

Category URL keywords.


		
protected $image : string

Category image.


		
protected $imageAltText : string

Image alternative text.


		
protected $icon : string

Category icon file.