CustomSectionProvider extends Provider
Table of Contents
Constants
- COUNTER_PREFIX = 'crm_custom_page_'
- PAGE_SETTINGS_SEPARATOR = '~'
Methods
- buildCustomSectionCounterId() : string
- getAllCustomSectionIdsByEntityTypeId() : array<string|int, int>
- getAnalytics() : array<string|int, mixed>
- 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
- getCustomSectionIdByCounterId() : int
- getEntityTypeByPageSetting() : int|null
- getEntityTypeIdByCounterId() : int|null
- getPageSettingsByCounterId() : string
- getPagesSettingsByCustomSectionCounterId() : array<string|int, mixed>
- getSystemPageProviders() : array<string|int, mixed>
- getSystemPages() : array<string|int, CustomSectionPage>
- Returns an array of system (prescribed by the developer) pages
- hasCustomSection() : bool
- isAvailable() : bool
- Check if a custom section page with such $pageSettings should be displayed for the user with $userId
- isCustomSectionCounter() : bool
- isCustomSectionPageCounter() : bool
- isSystemPage() : bool
- Returns true if page is a system (added by the developer)
- isSystemPageCounter() : bool
- 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
COUNTER_PREFIX
public
mixed
COUNTER_PREFIX
= 'crm_custom_page_'
PAGE_SETTINGS_SEPARATOR
public
mixed
PAGE_SETTINGS_SEPARATOR
= '~'
Methods
buildCustomSectionCounterId()
public
static buildCustomSectionCounterId(int $customSectionId) : string
Parameters
- $customSectionId : int
Return values
stringgetAllCustomSectionIdsByEntityTypeId()
public
static getAllCustomSectionIdsByEntityTypeId(int $entityTypeId) : array<string|int, int>
Parameters
- $entityTypeId : int
Return values
array<string|int, int>getAnalytics()
public
getAnalytics(string $pageSettings) : array<string|int, mixed>
Parameters
- $pageSettings : string
Return values
array<string|int, mixed>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|nullgetCustomSectionIdByCounterId()
public
static getCustomSectionIdByCounterId(string $code) : int
Parameters
- $code : string
Return values
intgetEntityTypeByPageSetting()
public
static getEntityTypeByPageSetting(string $pageSetting) : int|null
Parameters
- $pageSetting : string
Return values
int|nullgetEntityTypeIdByCounterId()
public
static getEntityTypeIdByCounterId(string $code) : int|null
Parameters
- $code : string
Return values
int|nullgetPageSettingsByCounterId()
public
static getPageSettingsByCounterId(string $counterId) : string
Parameters
- $counterId : string
Return values
stringgetPagesSettingsByCustomSectionCounterId()
public
static getPagesSettingsByCustomSectionCounterId(string $code) : array<string|int, mixed>
Parameters
- $code : string
Return values
array<string|int, mixed>getSystemPageProviders()
public
static getSystemPageProviders() : array<string|int, mixed>
Return values
array<string|int, mixed>getSystemPages()
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>hasCustomSection()
public
static hasCustomSection(Dynamic $factory) : bool
Parameters
- $factory : Dynamic
Return values
boolisAvailable()
Check if a custom section page with such $pageSettings should be displayed for the user with $userId
public
isAvailable(string $pageSettings, int $userId) : bool
Parameters
- $pageSettings : string
- $userId : int
Tags
Return values
boolisCustomSectionCounter()
public
static isCustomSectionCounter(string $code) : bool
Parameters
- $code : string
Return values
boolisCustomSectionPageCounter()
public
static isCustomSectionPageCounter(string $counterId) : bool
Parameters
- $counterId : string
Return values
boolisSystemPage()
Returns true if page is a system (added by the developer)
public
static isSystemPage(string $pageSettings) : bool
Parameters
- $pageSettings : string
Return values
boolisSystemPageCounter()
public
static isSystemPageCounter(string $code) : bool
Parameters
- $code : string
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
resolveComponent(string $pageSettings, Uri $url) : Component|null
Parameters
- $pageSettings : string
- $url : Uri