public function onBeforeDeletePageCommit(BeforeDeletePageCommitEvent $event)
    {
        if ($event->isAborted()) {
            return;
        }

        $pageManager = $event->getContentManager();
        $pageRepository = $pageManager->getPageRepository();

        try {
            $languages = $this->languageRepository->activeLanguages();
            if (count($languages) > 0) {
                $idPage = $pageManager->get()->getId();
                $pageRepository->startTransaction();

                foreach ($languages as $alLanguage) {
                    $this->blockRepository->deleteBlocks($alLanguage->getId(), $idPage);
                }

                $pageRepository->commit();

                return true;
            }
        } catch (\Exception $e) {
            $event->abort();
            if (isset($pageRepository) && $pageRepository !== null) {
                $pageRepository->rollBack();
            }

            throw $e;
        }
    }