SilverStripe\LoginForms\EnablerExtension
Applies to the {@see Security} controller in order to detect requests for actions related to the log in process or other such credential management (such as the forgot password flow).
This is in order to replace the set theme list with a controlled set in order
to always show a consistent interface that relates more to the CMS than the website it is
loading on.
Particular actions can be set to be ignored by including them in the `excluded_actions` list
defined in yml _config for this class. By default all allowed actions on the Security controller
excepting `index` and `ping` will have the new theme set applied.
Synopsis
class EnablerExtension
extends Extension
{
- // members
- private static array $login_themes = ;
- private static array $excluded_actions = ;
- private string $defaultPageClass = '';
- // methods
- public void beforeCallActionHandler()
- public void afterCallActionHandler()
- public string ContentLocale()
Hierarchy
Extends
- SilverStripe\Core\Extension
Members
private
- $defaultPageClass
—
string
Used to store the value of Security.page_class so that we can temporarily disable it so that Security is used as the Controller instead of Page_Controller This is done so that Page_Controller::init() is not called which may included calls to Requirements::javascript(), Requirements::css(), etc The styling and javascript on login-forms module should be completely isolated from the regular website - $excluded_actions
—
array
Aids in preventing themes from being overridden in the case of delegating handlers e.g. if an extension adds a route that should not be styled by login-forms, this config setting can be used to prevent the otherwise blanket override applying to all actions. - $login_themes — array
Methods
public
- ContentLocale() — Returns an RFC1766 compliant locale string, e.g. 'fr-CA'.
- afterCallActionHandler()
- beforeCallActionHandler()