Class ProductRepositoryDeleter

Class ProductRepositoryDeleter

ProductRepositoryDeleter implements ProductRepositoryDeleterInterface

Methods summary

public __construct( CI_DB_query_builder $db, ProductRepositoryDeleteHelper $deleteHelper )

ProductRepositoryDeleter constructor.

public deleteById( IdType $productId ) : ProductRepositoryDeleter

Removes a product by the given product id.

protected _removeFeatureSetsByProductId( IdType $productId ) :

Removes related feature set records by the given product id.

protected _removeAdditionalFieldRelationsByProductId( IdType $productId ) :

Removes related additional field records by the given product id.

protected _removePropertiesByProductId( IdType $productId ) :

Removes related property records by the given product id.

protected _removePersonalOffersByCustomerStatusByProductId( IdType $productId ) :

Removes records from all dynamic personal_offer_by_customer_status_ tables by the given product id.

protected _removeReviewsByProductId( IdType $productId ) :

Removes review records by the given product id.

protected _removeRecordsByProductId( IdType $productId ) :

Removes records by products id in all related tables.

Properties summary

protected $db : CI_DB_query_builder

Database connection.