public function remove($idBlock, BlockManagersCollection $blockManagersCollection)
    {
        $blockManagerInfo = $blockManagersCollection->getManagerInfoByBlockId($idBlock);
        $blockManager = $blockManagerInfo['manager'];
        // @codeCoverageIgnoreStart
        if (null === $blockManager) {
            return null;
        }
        // @codeCoverageIgnoreEnd

        try {
            $this->blockRepository->startTransaction();

            // Adjust the blocks position
            $parts = $blockManagersCollection->removeAt($blockManagerInfo["index"]);
            $result = $this->adjustPosition('del', $parts["right"]);
            if (false !== $result) {
                $result = $blockManager->delete();
            }

            if (false !== $result) {
                $this->blockRepository->commit();

                return $result;
            }

            $this->blockRepository->rollBack();

            return $result;
        } catch (\Exception $e) { echo $e->getMessage();
            $this->blockRepository->rollBack();

            throw $e;
        }
    }