Provider
AbstractYes
Table of Contents
Constants
- PAGE_SETTINGS_SEPARATOR = '~'
Methods
- getCounterId() : string|null
- Returns counter id for a custom section page with $pageSettings Returns null if there is no counter for the page
- getCounterValue() : int|null
- Returns counter value for a custom section page with $pageSettings Returns null if there is no counter for the page
- getSystemPages() : array<string|int, CustomSectionPage>
- Returns an array of system (prescribed by the developer) pages
- isAvailable() : bool
- Check if a custom section page with such $pageSettings should be displayed for the user with $userId
- resolveComponent() : Component|null
- Returns params of a component that should be included in a custom section page with such $pageSettings If some error occurs, .e.g., $pageSettings are invalid, returns null instead
Constants
PAGE_SETTINGS_SEPARATOR
public
mixed
PAGE_SETTINGS_SEPARATOR
= '~'
Methods
getCounterId()
Returns counter id for a custom section page with $pageSettings Returns null if there is no counter for the page
public
getCounterId(string $pageSettings) : string|null
Parameters
- $pageSettings : string
Return values
string|nullgetCounterValue()
Returns counter value for a custom section page with $pageSettings Returns null if there is no counter for the page
public
getCounterValue(string $pageSettings) : int|null
Parameters
- $pageSettings : string
Return values
int|nullgetSystemPages()
Returns an array of system (prescribed by the developer) pages
public
getSystemPages(CustomSection $section[, bool $ignorePageAvailability = false ]) : array<string|int, CustomSectionPage>
Parameters
- $section : CustomSection
- $ignorePageAvailability : bool = false
-
if true, then all system pages will be included in the sample
Return values
array<string|int, CustomSectionPage>isAvailable()
Check if a custom section page with such $pageSettings should be displayed for the user with $userId
public
abstract isAvailable(string $pageSettings, int $userId) : bool
Parameters
- $pageSettings : string
- $userId : int
Return values
boolresolveComponent()
Returns params of a component that should be included in a custom section page with such $pageSettings If some error occurs, .e.g., $pageSettings are invalid, returns null instead
public
abstract resolveComponent(string $pageSettings, Uri $url) : Component|null
Parameters
- $pageSettings : string
- $url : Uri