protected function validateMountPage(array $mountPage)
    {
        $isValidMountPage = true;

        if (empty($mountPage['mountPageSource'])) {
            $isValidMountPage = false;

            $flashMessage = GeneralUtility::makeInstance(
                FlashMessage::class,
                'Property "Mounted page" must not be empty. Invalid Mount Page configuration for page ID ' . $mountPage['uid'] . '.',
                'Failed to initialize Mount Page tree. ',
                FlashMessage::ERROR
            );
            $this->flashMessageQueue->addMessage($flashMessage);
        }

        if (!$this->mountedPageExists($mountPage['mountPageSource'])) {
            $isValidMountPage = false;

            $flashMessage = GeneralUtility::makeInstance(
                FlashMessage::class,
                'The mounted page must be accessible in the frontend. '
                . 'Invalid Mount Page configuration for page ID '
                . $mountPage['uid'] . ', the mounted page with ID '
                . $mountPage['mountPageSource']
                . ' is not accessible in the frontend.',
                'Failed to initialize Mount Page tree. ',
                FlashMessage::ERROR
            );
            $this->flashMessageQueue->addMessage($flashMessage);
        }

        return $isValidMountPage;
    }
protected function validateMountPage(array $mountPage)
    {
        $isValidMountPage = true;

        if (empty($mountPage['mountPageSource'])) {
            $isValidMountPage = false;

            $flashMessage = GeneralUtility::makeInstance(
                FlashMessage::class,
                'Property "Mounted page" must not be empty. Invalid Mount Page configuration for page ID ' . $mountPage['uid'] . '.',
                'Failed to initialize Mount Page tree. ',
                FlashMessage::ERROR
            );
            $this->flashMessageQueue->addMessage($flashMessage);
        }

        if (!$this->mountedPageExists($mountPage['mountPageSource'])) {
            $isValidMountPage = false;

            $flashMessage = GeneralUtility::makeInstance(
                FlashMessage::class,
                'The mounted page must be accessible in the frontend. '
                . 'Invalid Mount Page configuration for page ID '
                . $mountPage['uid'] . ', the mounted page with ID '
                . $mountPage['mountPageSource']
                . ' is not accessible in the frontend.',
                'Failed to initialize Mount Page tree. ',
                FlashMessage::ERROR
            );
            $this->flashMessageQueue->addMessage($flashMessage);
        }

        return $isValidMountPage;
    }
protected function validateMountPage ( array $ mountPage ) { $ isValidMountPage = true ; if ( empty ( $ mountPage [ 'mountPageSource' ] ) ) { $ isValidMountPage = false ; $ flashMessage = GeneralUtility :: makeInstance ( FlashMessage :: class , 'Property "Mounted page" must not be empty. Invalid Mount Page configuration for page ID ' . $ mountPage [ 'uid' ] . '.' , 'Failed to initialize Mount Page tree. ' , FlashMessage :: ERROR ) ; $ this -> flashMessageQueue -> addMessage ( $ flashMessage ) ; } if ( ! $ this -> mountedPageExists ( $ mountPage [ 'mountPageSource' ] ) ) { $ isValidMountPage = false ; $ flashMessage = GeneralUtility :: makeInstance ( FlashMessage :: class , 'The mounted page must be accessible in the frontend. ' . 'Invalid Mount Page configuration for page ID ' . $ mountPage [ 'uid' ] . ', the mounted page with ID ' . $ mountPage [ 'mountPageSource' ] . ' is not accessible in the frontend.' , 'Failed to initialize Mount Page tree. ' , FlashMessage :: ERROR ) ; $ this -> flashMessageQueue -> addMessage ( $ flashMessage ) ; } return $ isValidMountPage ; }
Checks whether a Mount Page is properly configured.

@param array $mountPage A mount page
@return bool TRUE if the Mount Page is OK, FALSE otherwise
Checks whether a Mount Page is properly configured .