* @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ declare(strict_types=1); namespace PrestaShop\PrestaShop\Adapter\Product\Combination\CommandHandler; use PrestaShop\PrestaShop\Adapter\Product\Combination\Update\CombinationDeleter; use PrestaShop\PrestaShop\Core\Domain\Product\Combination\Command\BulkDeleteCombinationCommand; use PrestaShop\PrestaShop\Core\Domain\Product\Combination\CommandHandler\BulkDeleteCombinationHandlerInterface; /** * Deletes multiple combinations using legacy object model */ class BulkDeleteCombinationHandler implements BulkDeleteCombinationHandlerInterface { /** * @var CombinationDeleter */ private $combinationDeleter; /** * @param CombinationDeleter $combinationDeleter */ public function __construct( CombinationDeleter $combinationDeleter ) { $this->combinationDeleter = $combinationDeleter; } /** * {@inheritDoc} */ public function handle(BulkDeleteCombinationCommand $command): void { $this->combinationDeleter->bulkDeleteProductCombinations( $command->getProductId(), $command->getCombinationIds(), $command->getShopConstraint() ); } }