AccountPage::get_if_account_page_exists PHP Method

get_if_account_page_exists() protected static method

protected static get_if_account_page_exists ( ) : AccountPage
return AccountPage
    protected static function get_if_account_page_exists()
    {
        if ($page = DataObject::get_one('AccountPage')) {
            return $page;
        }
        user_error(_t('AccountPage.NoPage', 'No AccountPage was found. Please create one in the CMS!'), E_USER_ERROR);
        return null;
        // just to keep static analysis happy
    }