Class CategoryListProvider

Class CategoryListProvider

This class provides methods for creating a list of flattened categories with just its essential data. The list of categories is filtered by its parent category ID and customer status permissions and for simplicity it contains language specific data only in one language.

CategoryListProvider implements CategoryListProviderInterface

Methods summary

public __construct( LanguageCode $languageCode, array $conditions, CategoryRepositoryInterface $categoryRepo, CI_DB_query_builder $db )

CategoryListProvider constructor.

public getByParentId( IdType $parentId ) : CategoryListItemCollection

Returns a category list based the parent ID provided.

protected _select( void ) : CategoryListProvider

Build the select part of the query build.

protected _prepareCollection( array $result ) : CategoryListItemCollection

Prepares the CategoryListItemCollection object.

Properties summary

protected $languageCode : LanguageCode

Language code.


		
protected $conditions : array

Array of conditions.


		
protected $db : CI_DB_query_builder

Database query builder.


		
protected $categoryRepo : CategoryRepositoryInterface

Category Repository.