Manager
Table of Contents
Constants
- COUNTER_INFIX = '_custom_section_'
- ERROR_CODE_COMPONENT_NOT_FOUND = 'CUSTOM_SECTION_MANAGER_COMPONENT_NOT_FOUND'
- ERROR_CODE_INVALID_URL = 'CUSTOM_SECTION_MANAGER_INVALID_URL'
- ERROR_CODE_SECTION_NOT_AVAILABLE = 'CUSTOM_SECTION_MANAGER_SECTION_NOT_AVAILABLE'
- ERROR_CODE_SECTION_NOT_FOUND = 'CUSTOM_SECTION_MANAGER_SECTION_NOT_FOUND'
- VALID_CODE_REGEX = '|^[a-z0-9_.-]+$|u'
Methods
- appendSuperLeftMenuSections() : void
- Appends available custom sections to super left menu
- buildCustomSectionCounterId() : string
- Builds the counter code for the custom section menu. Like crm_custom_section_1 etc.
- clearLeftMenuCache() : void
- Clears left menu cache for the whole site
- clearLeftMenuCacheForUser() : void
- Clears left menu cache for the specified user
- getCustomSectionIdByCounterId() : int
- getCustomSectionMenuId() : string
- Returns menu id for the custom section
- getSectionRootUrl() : Uri|null
- getSystemPages() : array<string|int, CustomSectionPage>
- Return array of system pages by custom section code
- getSystemPagesCodes() : array<string|int, mixed>
- Return array of system page codes by custom section code
- getUrlForPage() : Uri|null
- Compile url for a custom section page
- isCustomSectionCounter() : bool
- resolveCustomSection() : ResolveResult
- Resolves the custom section and its pages by url
Constants
COUNTER_INFIX
public
mixed
COUNTER_INFIX
= '_custom_section_'
ERROR_CODE_COMPONENT_NOT_FOUND
public
mixed
ERROR_CODE_COMPONENT_NOT_FOUND
= 'CUSTOM_SECTION_MANAGER_COMPONENT_NOT_FOUND'
ERROR_CODE_INVALID_URL
public
mixed
ERROR_CODE_INVALID_URL
= 'CUSTOM_SECTION_MANAGER_INVALID_URL'
ERROR_CODE_SECTION_NOT_AVAILABLE
public
mixed
ERROR_CODE_SECTION_NOT_AVAILABLE
= 'CUSTOM_SECTION_MANAGER_SECTION_NOT_AVAILABLE'
ERROR_CODE_SECTION_NOT_FOUND
public
mixed
ERROR_CODE_SECTION_NOT_FOUND
= 'CUSTOM_SECTION_MANAGER_SECTION_NOT_FOUND'
VALID_CODE_REGEX
public
mixed
VALID_CODE_REGEX
= '|^[a-z0-9_.-]+$|u'
Methods
appendSuperLeftMenuSections()
Appends available custom sections to super left menu
public
appendSuperLeftMenuSections(array<string|int, mixed> &$superLeftMenuSections) : void
Parameters
- $superLeftMenuSections : array<string|int, mixed>
buildCustomSectionCounterId()
Builds the counter code for the custom section menu. Like crm_custom_section_1 etc.
public
static buildCustomSectionCounterId(string $moduleId, int|null $customSectionId) : string
..
Parameters
- $moduleId : string
- $customSectionId : int|null
Return values
stringclearLeftMenuCache()
Clears left menu cache for the whole site
public
clearLeftMenuCache() : void
clearLeftMenuCacheForUser()
Clears left menu cache for the specified user
public
clearLeftMenuCacheForUser(int $userId) : void
Parameters
- $userId : int
getCustomSectionIdByCounterId()
public
static getCustomSectionIdByCounterId(string $counterId, string $moduleId) : int
Parameters
- $counterId : string
- $moduleId : string
Return values
intgetCustomSectionMenuId()
Returns menu id for the custom section
public
getCustomSectionMenuId(string $customSectionCode) : string
Parameters
- $customSectionCode : string
Return values
stringgetSectionRootUrl()
public
getSectionRootUrl(string $customSectionCode) : Uri|null
Parameters
- $customSectionCode : string
Return values
Uri|nullgetSystemPages()
Return array of system pages by custom section code
public
getSystemPages(string $customSectionCode[, bool $ignorePageAvailability = false ]) : array<string|int, CustomSectionPage>
Parameters
- $customSectionCode : string
- $ignorePageAvailability : bool = false
Return values
array<string|int, CustomSectionPage>getSystemPagesCodes()
Return array of system page codes by custom section code
public
getSystemPagesCodes(string $customSectionCode[, bool $ignorePageAvailability = false ]) : array<string|int, mixed>
Parameters
- $customSectionCode : string
- $ignorePageAvailability : bool = false
Return values
array<string|int, mixed>getUrlForPage()
Compile url for a custom section page
public
getUrlForPage(string $customSectionCode, string $pageCode) : Uri|null
Parameters
- $customSectionCode : string
- $pageCode : string
Return values
Uri|nullisCustomSectionCounter()
public
static isCustomSectionCounter(string $counterId, string $moduleId) : bool
Parameters
- $counterId : string
- $moduleId : string
Return values
boolresolveCustomSection()
Resolves the custom section and its pages by url
public
resolveCustomSection(Uri $url) : ResolveResult
Parameters
- $url : Uri