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

  • ProductCategoryLinker
  • ProductImageContainerRepository
  • ProductPermissionSetter
  • ProductRepository
  • ProductRepositoryDeleter
  • ProductRepositoryReader
  • ProductRepositoryWriter
  • ProductSettingsRepository
  • ProductSettingsRepositoryReader
  • ProductSettingsRepositoryWriter

Class ProductImageContainerRepository

Class ProductImageContainerRepository

ProductImageContainerRepository implements ProductImageContainerRepositoryInterface
Package: Product\Repositories
Category: System
Located at CoreServices/Product/Repositories/ProductImageContainerRepository.inc.php

Methods summary

public
# __construct( CI_DB_query_builder $db )

ProductImageContainerRepository constructor.

ProductImageContainerRepository constructor.

Parameters

$db
Database connection.
public ProductImageContainerRepository
# store( IdType $productId, ProductImageContainerInterface $imageContainer )

Stores the product image container.

Stores the product image container.

Parameters

$productId
Product ID.
$imageContainer
Product image container.

Returns

ProductImageContainerRepository
Same instance for method chaining.

Throws

InvalidArgumentException
On invalid arguments.

Implementation of

ProductImageContainerRepositoryInterface::store()
public ProductImageContainerInterface
# getByProductId( IdType $productId )

Returns a product image container based on the product ID given.

Returns a product image container based on the product ID given.

Parameters

$productId
Product ID.

Returns

ProductImageContainerInterface
Product image container.

Throws

InvalidArgumentException
On invalid arguments.

Implementation of

ProductImageContainerRepositoryInterface::getByProductId()
public ProductImageContainerRepository
# deleteByProductId( IdType $productId )

Deletes a product image container based on the product ID given.

Deletes a product image container based on the product ID given.

Parameters

$productId
Product ID.

Returns

ProductImageContainerRepository
Same instance for method chaining.

Implementation of

ProductImageContainerRepositoryInterface::deleteByProductId()
protected
# _saveAdditionalImagesAltText( ProductImageContainerInterface $imageContainer, IdType $productId )

Saves alternative texts for additional images.

Saves alternative texts for additional images.

Parameters

$imageContainer
Image container.
$productId
Product ID.

Throws

InvalidArgumentException
on invalid arguments.
protected
# _savePrimaryImageAltText( ProductImageContainerInterface $imageContainer, IdType $productId )

Saves alternative texts for the primary image.

Saves alternative texts for the primary image.

Parameters

$imageContainer
Image container.
$productId
Product ID.

Throws

InvalidArgumentException
on invalid arguments.
protected
# _getPrimaryImageAltText( ProductImageInterface $primaryImage, IdType $productId )

Sets alternative texts for the primary image provided.

Sets alternative texts for the primary image provided.

Parameters

$primaryImage
Product primary image.
$productId
Product ID.

Throws

InvalidArgumentException
on invalid arguments.
protected
# _getAdditionalImagesAltText( ProductImageInterface $additionalImage, IdType $productId, IdType $imageId )

Sets the alternative texts for an additional image.

Sets the alternative texts for an additional image.

Parameters

$additionalImage
Additional Image.
$productId
Product ID.
$imageId
Image ID.

Throws

InvalidArgumentException
on invalid arguments.
protected array
# _getLanguages( )

Get Languages

Get Languages

Receives and returns all found languages in the database.

Returns

array
protected array
# _queryPrimaryImage( IdType $productId )

Perform database query to get primary image.

Perform database query to get primary image.

Parameters

$productId
Product ID.

Returns

array
Result.
protected array
# _queryAdditionalImages( IdType $productId )

Perform database query to get additional images.

Perform database query to get additional images.

Parameters

$productId
Product ID.

Returns

array
Result.

Properties summary

protected CI_DB_query_builder $db

Database connection.

Database connection.

#
API documentation generated by ApiGen