ProductRepositoryDeleter
in package
implements
ProductRepositoryDeleterInterface
Class ProductRepositoryDeleter
Tags
Interfaces, Classes and Traits
- ProductRepositoryDeleterInterface
- Interface ProductRepositoryDeleterInterface
Table of Contents
- $db : CI_DB_query_builder
- Database connection.
- $deleteHelper : ProductRepositoryDeleteHelper
- __construct() : mixed
- ProductRepositoryDeleter constructor.
- deleteById() : ProductRepositoryDeleter
- Removes a product by the given product id.
- _removeAdditionalFieldRelationsByProductId() : $this|ProductRepositoryDeleter
- Removes related additional field records by the given product id.
- _removeFeatureSetsByProductId() : $this|ProductRepositoryDeleter
- Removes related feature set records by the given product id.
- _removePersonalOffersByCustomerStatusByProductId() : $this|ProductRepositoryDeleter
- Removes records from all dynamic personal_offer_by_customer_status_ tables by the given product id.
- _removePropertiesByProductId() : $this|ProductRepositoryDeleter
- Removes related property records by the given product id.
- _removeRecordsByProductId() : $this|ProductRepositoryDeleter
- Removes records by products id in all related tables.
- _removeReviewsByProductId() : $this|ProductRepositoryDeleter
- Removes review records by the given product id.
Properties
$db
Database connection.
protected
CI_DB_query_builder
$db
$deleteHelper
protected
ProductRepositoryDeleteHelper
$deleteHelper
Methods
__construct()
ProductRepositoryDeleter constructor.
public
__construct(CI_DB_query_builder $db, ProductRepositoryDeleteHelper $deleteHelper) : mixed
Parameters
- $db : CI_DB_query_builder
- $deleteHelper : ProductRepositoryDeleteHelper
Return values
mixed —deleteById()
Removes a product by the given product id.
public
deleteById(IdType $productId) : ProductRepositoryDeleter
Parameters
- $productId : IdType
-
Id of product entity.
Return values
ProductRepositoryDeleter —Same instance for chained method calls.
_removeAdditionalFieldRelationsByProductId()
Removes related additional field records by the given product id.
protected
_removeAdditionalFieldRelationsByProductId(IdType $productId) : $this|ProductRepositoryDeleter
Parameters
- $productId : IdType
-
Product id of records to be removed.
Return values
$this|ProductRepositoryDeleter —Same instance for chained method calls.
_removeFeatureSetsByProductId()
Removes related feature set records by the given product id.
protected
_removeFeatureSetsByProductId(IdType $productId) : $this|ProductRepositoryDeleter
Parameters
- $productId : IdType
-
Product id of records to be removed.
Return values
$this|ProductRepositoryDeleter —Same instance for chained method calls.
_removePersonalOffersByCustomerStatusByProductId()
Removes records from all dynamic personal_offer_by_customer_status_ tables by the given product id.
protected
_removePersonalOffersByCustomerStatusByProductId(IdType $productId) : $this|ProductRepositoryDeleter
Parameters
- $productId : IdType
-
Product id of records to be removed.
Return values
$this|ProductRepositoryDeleter —Same instance for chained method calls.
_removePropertiesByProductId()
Removes related property records by the given product id.
protected
_removePropertiesByProductId(IdType $productId) : $this|ProductRepositoryDeleter
Parameters
- $productId : IdType
-
Product id of records to be removed.
Return values
$this|ProductRepositoryDeleter —Same instance for chained method calls.
_removeRecordsByProductId()
Removes records by products id in all related tables.
protected
_removeRecordsByProductId(IdType $productId) : $this|ProductRepositoryDeleter
Parameters
- $productId : IdType
-
Product id of records to be removed.
Return values
$this|ProductRepositoryDeleter —Same instance for chained method calls.
_removeReviewsByProductId()
Removes review records by the given product id.
protected
_removeReviewsByProductId(IdType $productId) : $this|ProductRepositoryDeleter
Parameters
- $productId : IdType
-
Product id of records to be removed.
Return values
$this|ProductRepositoryDeleter —Same instance for chained method calls.