Overview
  • Package
  • Class
  • Tree
  • Todo

Packages

  • AddonValue
    • Interfaces
  • AdminHttpViewControllers
  • ApiV2Controllers
  • Authentication
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Strategies
  • Category
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Providers
    • Repositories
    • Storages
  • Customer
    • Address
    • Country
    • CountryZone
    • Interfaces
    • Storages
    • Validation
    • ValueObjects
  • CustomerGroup
    • Entities
    • Factories
    • Interfaces
    • Repositories
    • Serializers
    • Services
    • ValueObjects
  • Email
    • Collections
    • Entities
    • Exceptions
    • Interfaces
    • Repository
    • ValueObjects
  • Extensions
    • Customers
    • Emails
    • Geschaeftskundenversand
    • Helpers
    • Invoices
    • Orders
    • ParcelShopFinder
    • QuickEdit
    • Serializers
    • Templates
  • Geschaeftskundenversand
    • Exceptions
  • Http
    • Collections
    • Exceptions
    • Factories
    • Interfaces
    • ValueObjects
  • HttpViewControllers
  • InfoBox
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Repositories
  • Invoice
    • Interfaces
    • ValueObjects
  • Loaders
    • CrossCuttingLoader
    • GXCoreLoader
    • Interfaces
  • Manufacturer
    • Entities
    • Factories
    • Interfaces
    • Repositories
  • Modules
    • Collections
    • Controllers
    • Interfaces
  • None
  • Order
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Repositories
    • Storages
    • ValueObjects
  • OrderStatus
    • Collections
    • Entities
    • Exceptions
    • Factories
    • Interfaces
    • Repositories
  • Precheck
  • Product
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Providers
    • Repositories
    • Storages
  • ProductModule
    • Collections
    • Deleter
    • Entities
    • Factories
    • Interface
    • Interfaces
    • Reader
    • Repositories
    • Writer
  • QuantityUnit
    • Entities
    • Factories
    • Repositories
  • QuickEdit
    • Interfaces
    • Repositories
  • Shared
    • ClassFinder
    • Exceptions
    • FileSystem
    • Interfaces
    • Storage
    • Types
  • SharedShoppingCart
    • Interfaces
  • Slider
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Repositories
    • Storages
  • Smarty
    • plugins
  • StaticSeoUrl
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Repositories
  • StaticSeoUrls
  • Statistics
    • Interfaces
  • UserConfiguration
    • Interfaces
    • Repository
  • VersionInfo
    • Factories
    • Reader
    • ValueObjects
  • VPE
    • Entities
    • Factories
    • Repositories

Classes

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

Class CategoryRepositoryReader

Class CategoryRepositoryReader

This class provides methods for fetching specific category records from the database and is used in the category repository among the classes for writing and deleting category records.

CategoryRepositoryReader implements CategoryRepositoryReaderInterface
Package: Category\Repositories
Category: System
Located at Services/Core/Category/Repositories/Reader/CategoryRepositoryReader.inc.php

Methods summary

public
# __construct( CI_DB_query_builder $db, CategoryFactoryInterface $categoryFactory )

CategoryRepositoryReader constructor.

CategoryRepositoryReader constructor.

Parameters

$db
Database connector.
$categoryFactory
Category factory.
public StoredCategoryInterface
# getById( IdType $categoryId )

Returns a category.

Returns a category.

Parameters

$categoryId
Category ID.

Returns

StoredCategoryInterface

Throws

UnexpectedValueException
if no category record for the provided category ID was found.

Implementation of

CategoryRepositoryReaderInterface::getById()
public IdCollection
# getByParentId( IdType $parentId )

Returns all Categories with the provided parent ID.

Returns all Categories with the provided parent ID.

Parameters

$parentId

Returns

IdCollection

Implementation of

CategoryRepositoryReaderInterface::getByParentId()
public IdCollection
# getCategoryIdsTree( IdType $parentCategoryId )

Returns an id collection with the ids of subcategories.

Returns an id collection with the ids of subcategories.

Parameters

$parentCategoryId
Parent category id.

Returns

IdCollection

Implementation of

CategoryRepositoryReaderInterface::getCategoryIdsTree()
protected array
# _getCategoryIdsTreeArray( IdType $parentCategoryId )

Fetches the ids of the subcategories from the passed parent category.

Fetches the ids of the subcategories from the passed parent category.

Parameters

$parentCategoryId
Parent id from category of subcategory ids to be fetched.

Returns

array
Contains unsorted ids of sub categories from passed parent category id.
protected StoredCategory
# _createCategoryByArray( array $categoryData, array $categoryDescriptionData )

Creates a category instance.

Creates a category instance.

Parameters

$categoryData
Category query result.
$categoryDescriptionData
Category description query result.

Returns

StoredCategory
Returns the complete category object.

Throws

LogicException
InvalidArgumentException

Properties summary

protected CI_DB_query_builder $db

Database connector.

Database connector.

#
protected CategoryFactoryInterface $categoryFactory

Category factory.

Category factory.

#
API documentation generated by ApiGen