ProductRepositoryDeleteHelper

Class ProductRepositoryDeleteHelper

package

Default

Methods

Determines the product content description ids that are used as indicator to remove the right data sets from the product_content_resources table.

_determinePcdIdsToBeRemovedInPcr(\CI_DB_query_builder $db, integer $productContentId) : array

Arguments

$db

\CI_DB_query_builder

Database access instance.

$productContentId

integer

Product content id to be removed.

Response

array

Product content description ids or an empty array.

Determines the product content ids that should be removed by the given product id.

_determinePcIdToBeRemoved(\IdType $productId, \CI_DB_query_builder $db) : array

Arguments

$productId

\IdType

Id of related product of entries that should be removed.

$db

\CI_DB_query_builder

Database access instance.

Response

array

Ids of product contents to be removed, if there are any.

Removes product content data by the given product id.

_removeProductContentByProductId(\IdType $productId, \CI_DB_query_builder $db, \ProductsContentFileStorage $productsContentFileStorage, \ResponsiveFileManagerConfigurationStorage $fileManagerStorage) : $this

Arguments

$productId

\IdType

Product id of content data to be removed.

$db

\CI_DB_query_builder

Query builder instance to access data.

$productsContentFileStorage

\ProductsContentFileStorage

Storage class for product contents.

$fileManagerStorage

\ResponsiveFileManagerConfigurationStorage

File manager configuration access.

Response

$this

Removes product content description entries by the given product content id.

_removeProductContentDescriptionEntries(\CI_DB_query_builder $db, integer $pcId) : $this|\ProductRepositoryDeleteHelper

Arguments

$db

\CI_DB_query_builder

Database access instance.

$pcId

integer

Related product content id.

Response

$this|\ProductRepositoryDeleteHelper

Same instance for chained method calls.

Removes product content entries by the given product content id.

_removeProductContentEntries(\CI_DB_query_builder $db, integer $pcId) : $this|\ProductRepositoryDeleteHelper

Arguments

$db

\CI_DB_query_builder

Database access instance.

$pcId

integer

Id of product content record to be removed.

Response

$this|\ProductRepositoryDeleteHelper

Same instance for chained method calls.

Removes product content products entries by the given product id.

_removeProductContentProductsEntries(\CI_DB_query_builder $db, \IdType $productId) : $this|\ProductRepositoryDeleteHelper

Arguments

$db

\CI_DB_query_builder

Database access instance.

$productId

\IdType

Related product id.

Response

$this|\ProductRepositoryDeleteHelper

Same instance for chained method calls.

Removes product content resource entries by the given product content description ids.

_removeProductContentResourceEntries(\CI_DB_query_builder $db, array $pcdIds) : $this|\ProductRepositoryDeleteHelper

Arguments

$db

\CI_DB_query_builder

Database access instance.

$pcdIds

array

Related product content description ids.

Response

$this|\ProductRepositoryDeleteHelper

Same instance for chained method calls.

Deletes unused product content files from storage.

_removeUnusedProductContentFiles(integer $productContentIdToBeRemoved, \CI_DB_query_builder $db, \ProductsContentFileStorage $productsContentFileStorage) : $this

Arguments

$productContentIdToBeRemoved

integer

$db

\CI_DB_query_builder

$productsContentFileStorage

\ProductsContentFileStorage

Response

$this

Removes product contents, if they are not duplicated.

productsContent(\IdType $productId, \CI_DB_query_builder $db, \ProductsContentFileStorage $productsContentFileStorage, \ResponsiveFileManagerConfigurationStorage $fileManagerStorage) : $this|\ProductRepositoryDeleteHelper

Arguments

$productId

\IdType

Product id of content to be removed.

$db

\CI_DB_query_builder

Query builder instance to access data.

$productsContentFileStorage

\ProductsContentFileStorage

Storage class for product contents.

$fileManagerStorage

\ResponsiveFileManagerConfigurationStorage

File manager configuration access.

Response

$this|\ProductRepositoryDeleteHelper

Same instance for chained method calls.

Removes property combination images.

propertyCombinationImages(\IdType $combinationId) : $this|\ProductRepositoryDeleteHelper

Arguments

$combinationId

\IdType

Combination id of images to be removed.

Response

$this|\ProductRepositoryDeleteHelper

Same instance for chained method calls.

Reset caches for categories and 'also_purchased', if cache is used.

resetCategoriesAndAlsoPurchasedCache() : $this|\ProductRepositoryDeleteHelper

Response

$this|\ProductRepositoryDeleteHelper

Same instance for chained method calls.