public function bootstrap()
    {
        $languageRepository = $this->languageManager->getLanguageRepository();
        $pageRepository = $this->pageManager->getPageRepository();
        $blockRepository = $this->blockManager->getBlockRepository();

        $languageRepository->startTransaction();
        if ( ! $this->removeActiveLanguages($languageRepository)) {
            return $this->fails($languageRepository);
        }

        if ( ! $this->removeActivePages($pageRepository)) {
            return $this->fails($languageRepository);
        }

        $blockRepository->deleteBlocks(1, 1, true);

        if ( ! $this->addLanguage()) {
            return $this->fails($languageRepository);
        }

        if ( ! $this->addPage()) {
            return $this->fails($languageRepository);
        }

        $languageRepository->commit();

        return true;
    }
public function bootstrap()
    {
        $languageRepository = $this->languageManager->getLanguageRepository();
        $pageRepository = $this->pageManager->getPageRepository();
        $blockRepository = $this->blockManager->getBlockRepository();

        $languageRepository->startTransaction();
        if ( ! $this->removeActiveLanguages($languageRepository)) {
            return $this->fails($languageRepository);
        }

        if ( ! $this->removeActivePages($pageRepository)) {
            return $this->fails($languageRepository);
        }

        $blockRepository->deleteBlocks(1, 1, true);

        if ( ! $this->addLanguage()) {
            return $this->fails($languageRepository);
        }

        if ( ! $this->addPage()) {
            return $this->fails($languageRepository);
        }

        $languageRepository->commit();

        return true;
    }
public function bootstrap ( ) { $ languageRepository = $ this -> languageManager -> getLanguageRepository ( ) ; $ pageRepository = $ this -> pageManager -> getPageRepository ( ) ; $ blockRepository = $ this -> blockManager -> getBlockRepository ( ) ; $ languageRepository -> startTransaction ( ) ; if ( ! $ this -> removeActiveLanguages ( $ languageRepository ) ) { return $ this -> fails ( $ languageRepository ) ; } if ( ! $ this -> removeActivePages ( $ pageRepository ) ) { return $ this -> fails ( $ languageRepository ) ; } $ blockRepository -> deleteBlocks ( 1 , 1 , true ) ; if ( ! $ this -> addLanguage ( ) ) { return $ this -> fails ( $ languageRepository ) ; } if ( ! $ this -> addPage ( ) ) { return $ this -> fails ( $ languageRepository ) ; } $ languageRepository -> commit ( ) ; return true ; }
Bootstraps the website

@return boolean

@api
Bootstraps the website