SilverStripe\Snapshots\Handler\PageContextProvider
Trait PageContextProvider
Synopsis
class PageContextProvider
{
- // members
- private HTTPRequest|null $request;
- // methods
- public void __construct()
- public SiteTree|null getCurrentPageFromController()
- public SiteTree|null getCurrentPageFromRequestUrl()
- public HTTPRequest|null getRequest()
- public $this setRequest()
- public SiteTree|null getPageFromReferrer()
Hierarchy
Uses
- SilverStripe\Core\Injector\Injectable
Members
private
Methods
public
- __construct()
- getCurrentPageFromController() — Provides the ability to detect current page from controller note that this can be only used for actions that are aware of the current page
- getCurrentPageFromRequestUrl() — Provides the ability to detect current page from URL this is useful for actions that have no explicit awareness of the current page
- getPageFromReferrer()
- getRequest()
- setRequest()