* @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\DeleteCombinationCommand; use PrestaShop\PrestaShop\Core\Domain\Product\Combination\CommandHandler\DeleteCombinationHandlerInterface; /** * Handles @see DeleteCombinationCommand using adapter udpater service */ class DeleteCombinationHandler implements DeleteCombinationHandlerInterface { /** * @var CombinationDeleter */ private $combinationDeleter; /** * @param CombinationDeleter $combinationDeleter */ public function __construct(CombinationDeleter $combinationDeleter) { $this->combinationDeleter = $combinationDeleter; } /** * {@inheritDoc} */ public function handle(DeleteCombinationCommand $command): void { $this->combinationDeleter->deleteCombination($command->getCombinationId(), $command->getShopConstraint()); } }