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
  • Email
    • Collections
    • Entities
    • Exceptions
    • Interfaces
    • Repository
    • ValueObjects
  • Extensions
    • Customers
    • Emails
    • Helpers
    • Invoices
    • Orders
    • Serializers
    • Templates
  • Http
    • Collections
    • Exceptions
    • Factories
    • Interfaces
    • ValueObjects
  • HttpViewControllers
  • InfoBox
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Repositories
  • Invoice
    • Interfaces
    • ValueObjects
  • Loaders
    • CrossCuttingLoader
    • GXCoreLoader
    • Interfaces
  • Modules
    • Collections
    • Controllers
    • Interfaces
  • None
  • Order
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Repositories
    • Storages
    • ValueObjects
  • Precheck
  • Product
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Providers
    • Repositories
    • Storages
  • ProductModule
    • Collections
    • Deleter
    • Entities
    • Factories
    • Interface
    • Interfaces
    • Reader
    • Repositories
    • Writer
  • Shared
    • ClassFinder
    • Exceptions
    • FileSystem
    • Interfaces
    • Storage
    • Types
  • SharedShoppingCart
    • Interfaces
  • Slider
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Repositories
    • Storages
  • Statistics
    • Interfaces
  • UserConfiguration
    • Interfaces
    • Repository

Classes

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

Class CategoryRepositoryWriter

Class CategoryRepositoryWriter

This class provides methods for creating and updating specific category records in the database and is used in the category repository among the classes for reading and deleting category records.

CategoryRepositoryWriter implements CategoryRepositoryWriterInterface
Package: Category\Repositories
Category: System
Located at Services/Core/Category/Repositories/Writer/CategoryRepositoryWriter.php

Methods summary

public
# __construct( CI_DB_query_builder $db, LanguageProviderInterface $languageProvider )

CategoryRepositoryWriter constructor.

CategoryRepositoryWriter constructor.

Parameters

$db
Database connector.
$languageProvider
public integer
# insert( CategoryInterface $category )

Inserts a category record into the database accordingly to the provided category object and returns the ID from the saved entity.

Inserts a category record into the database accordingly to the provided category object and returns the ID from the saved entity.

Parameters

$category
The category to insert.

Returns

integer
Returns the ID of the new category.

Throws

UnexpectedValueException
When no language id was found by the given language code.
InvalidArgumentException

Implementation of

CategoryRepositoryWriterInterface::insert()
public CategoryRepositoryWriter
# update( StoredCategoryInterface $category )

Updates an existing category record accordingly to the provided category object.

Updates an existing category record accordingly to the provided category object.

Parameters

$category
The category to update.

Returns

CategoryRepositoryWriter
Same instance for chained method calls.

Throws

UnexpectedValueException
When no language id was found by the given language code.
InvalidArgumentException

Implementation of

CategoryRepositoryWriterInterface::update()
protected
# _parseCategoryData( CategoryInterface $category )
protected
# _parseCategoryDescriptionData( CategoryInterface $category, LanguageCode $languageCode )

Properties summary

protected CI_DB_query_builder $db
#
protected string $categoriesTable
# 'categories'
protected LanguageProviderInterface $languageProvider

$languageProvider

$languageProvider

#
API documentation generated by ApiGen