protected function updateSlotStatus(array $templateSlots, array $changedSlots)
    {
        try {
            $result = true;
            $this->blockRepository->startTransaction();
            foreach ($changedSlots as $slotName => $repeated) {
                $converter = $this->slotsConverterFactory->createConverter($templateSlots[$slotName], $repeated);
                if (null === $converter) continue;

                $result = $converter->convert();
                if (!$result) {
                    break;
                }
            }

            if ($result) {
                $this->blockRepository->commit();
            } else {
                $this->blockRepository->rollBack();
            }

            return $result;
        } catch (\Exception $e) {
            if (isset($this->blockRepository) && $this->blockRepository !== null) {
                $this->blockRepository->rollBack();
            }

            throw $e;
        }
    }