Class CategorySettingsRepositoryReader

Class CategorySettingsRepositoryReader

This class provides methods for fetching particular columns of specific category records in the database. The category settings are stored in the categories table and are more related to display and visibility modes of category related data.

CategorySettingsRepositoryReader implements CategorySettingsRepositoryReaderInterface

Methods summary

public __construct( CI_DB_query_builder $db, CategoryFactoryInterface $categoryFactory, CustomerStatusProviderInterface $customerStatusProvider )

CategorySettingsRepositoryReader constructor.

public getById( IdType $categoryId ) : CategorySettingsInterface

Returns category settings based on ID given.

protected _createAndReturnCategorySettings( array $category ) : CategorySettings

Creates a CategorySettings object and returns it.

protected _setGroupPermissions( array $category, array $groupPermissionIds, CategorySettings $categorySettings ) : CategorySettingsRepositoryReader

Sets the permitted customers statuses.

Properties summary

protected $db : CI_DB_query_builder

Database Connection


		
protected $categoryFactory : CategoryFactoryInterface

Category factory


		
protected $customerStatusProvider : CustomerStatusProviderInterface

Customer Status Provider