Overview
  • Package
  • Class
  • Tree
  • Todo

Packages

  • AddonValue
    • Interfaces
  • ApiV2Controllers
  • Category
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Providers
    • Repositories
    • Storages
  • Customer
    • Address
    • Country
    • CountryZone
    • Interfaces
    • Validation
    • ValueObjects
  • Email
    • Collections
    • Entities
    • Exceptions
    • Interfaces
    • Repository
    • ValueObjects
  • Http
    • Collections
    • Exceptions
    • Factories
    • Interfaces
    • ValueObjects
  • Loaders
    • CrossCuttingLoader
    • GXCoreLoader
    • Interfaces
  • None
  • Order
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Repositories
    • Storages
    • ValueObjects
  • Product
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Providers
    • Repositories
    • Storages
  • ProductModule
    • Collections
    • Deleter
    • Entities
    • Factories
    • Interface
    • Interfaces
    • Reader
    • Repositories
    • Writer
  • Shared
    • Exceptions
    • FileSystem
    • Interfaces
    • Storage
    • Types
  • Statistics
    • Interfaces
  • UserConfiguration
    • Interfaces
    • Repository

Classes

  • CategoryRepository
  • CategoryRepositoryDeleter
  • CategoryRepositoryReader
  • CategoryRepositoryWriter
  • CategorySettingsRepository
  • CategorySettingsRepositoryReader
  • CategorySettingsRepositoryWriter

Class CategoryRepository

Class CategoryRepository

This class handles the database operations that concern the category records of the database. It provides a layer for more complicated methods that use the writer, reader and deleter.

CategoryRepository implements CategoryRepositoryInterface
Package: Category\Repositories
Category: System
Located at CoreServices/Category/Repositories/CategoryRepository.inc.php

Methods summary

public
# __construct( CategoryRepositoryReaderInterface $reader, CategoryRepositoryWriterInterface $writer, CategoryRepositoryDeleterInterface $deleter, CategorySettingsRepositoryInterface $settingsRepo, AddonValueServiceInterface $addonValueService, CustomerStatusProviderInterface $customerStatusProvider )

Initialize the category repository.

Initialize the category repository.

Parameters

$reader

Reader instance to fetch category data from the storage.

$writer

Writer instance to store or add category data in the storage.

$deleter

Deleter instance to remove category data from the storage.

$settingsRepo

Category setting repository to save/add/remove category settings in the storage.

$addonValueService

Addon value service instance to handle the category addon values.

$customerStatusProvider

Customer status provider to handle group permissions

public integer
# add( CategoryInterface $category )

Adds a category.

Adds a category.

Parameters

$category
Category.

Returns

integer
Stored ID of the passed category.

Implementation of

CategoryRepositoryInterface::add()
public CategoryRepository
# store( StoredCategoryInterface $category )

Stores a category.

Stores a category.

Parameters

$category
Category.

Returns

CategoryRepository
Same instance for chained method calls.

Implementation of

CategoryRepositoryInterface::store()
public StoredCategoryInterface
# getCategoryById( IdType $categoryId )

Gets a category by the given ID.

Gets a category by the given ID.

Parameters

$categoryId
Category ID.

Returns

StoredCategoryInterface

Implementation of

CategoryRepositoryInterface::getCategoryById()
public IdCollection
# getCategoryIdsByParentId( IdType $parentId )

Returns all Categories with the provided parent ID.

Returns all Categories with the provided parent ID.

Parameters

$parentId

Returns

IdCollection

Implementation of

CategoryRepositoryInterface::getCategoryIdsByParentId()
public CategoryRepository
# deleteCategoryById( IdType $categoryId )

Deletes a category by the given ID.

Deletes a category by the given ID.

Parameters

$categoryId
Category ID.

Returns

CategoryRepository
Same instance for chained method calls.

Implementation of

CategoryRepositoryInterface::deleteCategoryById()

Properties summary

protected CategoryRepositoryReaderInterface $reader

Category repository reader.

Category repository reader.

#
protected CategoryRepositoryWriterInterface $writer

Category repository writer.

Category repository writer.

#
protected CategoryRepositoryDeleterInterface $deleter

Category repository deleter.

Category repository deleter.

#
protected CategorySettingsRepositoryInterface $settingsRepo

Category settings repository.

Category settings repository.

#
protected AddonValueServiceInterface $addonValueService

Addon value service.

Addon value service.

#
protected CustomerStatusProviderInterface $customerStatusProvider

Customer Status Provider

Customer Status Provider

#
API documentation generated by ApiGen