Core Page controller methods
The Photon\Core\Controller\Page
class provides a number of useful functions to the controllers that extend it.
Method | Description |
---|---|
render() | Render a twig template and return a Response |
getMetaElement() | Create and return a Meta object |
getRequestStack() | Get the Symfony Request object for this request |
getMetadata() | Populate and return a Metadata object for this page |
isPreview() | Check if this page is currently being accessed as a preview |
getTranslatedString() | Get the translated string for a given key based on the site's locale value |
isPasswordProtected() | Check if the site is currently behind password protection |
isAuthenticated() | Check if the user has a current session for viewing a site behind password protection |