protected function removeActivePages(PageRepositoryInterface $pageRepository)
    {
        try {
            $pages = $pageRepository->activePages();
            foreach ($pages as $page) {
                $page->delete();
            }

            return true;
        } catch (\Exception $ex) {
            $this->errorMessage = "An error occoured during the removing of existing pages. The reported error is: " . $ex->getMessage();

            return false;
        }
    }
protected function removeActivePages(PageRepositoryInterface $pageRepository)
    {
        try {
            $pages = $pageRepository->activePages();
            foreach ($pages as $page) {
                $page->delete();
            }

            return true;
        } catch (\Exception $ex) {
            $this->errorMessage = "An error occoured during the removing of existing pages. The reported error is: " . $ex->getMessage();

            return false;
        }
    }
protected function removeActivePages ( PageRepositoryInterface $ pageRepository ) { try { $ pages = $ pageRepository -> activePages ( ) ; foreach ( $ pages as $ page ) { $ page -> delete ( ) ; } return true ; } catch ( \ Exception $ ex ) { $ this -> errorMessage = "An error occoured during the removing of existing pages. The reported error is: " . $ ex -> getMessage ( ) ; return false ; } }
Removes the active pages

@param  \RedKiteLabs\RedKiteCms\RedKiteCmsBundle\Core\Repository\Repository\PageRepositoryInterface $pageRepository
@return boolean
Removes the active pages