\PrefixModelAsController
Synopsis
class PrefixModelAsController
extends ModelAsController
{
- // members
- protected string $locale = 'en_US';
- protected static string $default_homepage_link = 'home';
- // methods
- public SS_HTTPResponse handleRequest()
- public type getNestedController()
- protected boolean setLocale()
- protected void showPageNotFound()
- public static SiteTree find_old_page_localized()
Hierarchy
Extends
- ModelAsController
Members
protected
- $default_homepage_link — string
- $locale
—
string
The locale that is distilled from the URL's language prefix.
Methods
protected
- setLocale() — Distill the locale from the URL's language prefix. If the prefix isn't a proper locale, return false
- showPageNotFound() — try to show a proper 404 error page. If the locale doesn't exist or no errorpage exists for the current locale, show the 404 error page for the default locale this will not redirect! If this is the right approach is up for discussion...
public
- find_old_page_localized() — This version takes into account that the old page must have the same locale as the new one As aSQLQuery is used, that doesn't autmatically respond to the locale_filter, the ModelAsController::find_old_page() function needed to be extended
- getNestedController() — Try to determine the controller for the current request.
- handleRequest()