Manager
Table of Contents
Methods
- clearAndRefresh() : void
- Deletes all system prompts from local DB and loads new.
- deleteByFilter() : bool
- getByCode() : Item|null
- Returns Prompt Item by code.
- getCachedTree() : array<string|int, mixed>|null
- Returns Prompts by category in Tree mode from cache.
- getItemFromRawRow() : Item
- getList() : array<string|int, mixed>|null
- preparePromptCollection() : array<string|int, mixed>|null
- sortBySection() : array<string|int, mixed>
Methods
clearAndRefresh()
Deletes all system prompts from local DB and loads new.
public
static clearAndRefresh() : void
deleteByFilter()
public
static deleteByFilter(array<string|int, mixed> $filterToDelete) : bool
Parameters
- $filterToDelete : array<string|int, mixed>
Return values
boolgetByCode()
Returns Prompt Item by code.
public
static getByCode(string $promptCode) : Item|null
Parameters
- $promptCode : string
-
Prompt's code.
Return values
Item|nullgetCachedTree()
Returns Prompts by category in Tree mode from cache.
public
static getCachedTree(string $category[, string|null $roleCode = null ]) : array<string|int, mixed>|null
Use static::getList()
Parameters
- $category : string
- $roleCode : string|null = null
Return values
array<string|int, mixed>|nullgetItemFromRawRow()
public
static getItemFromRawRow(array<string|int, mixed> $data) : Item
Parameters
- $data : array<string|int, mixed>
Return values
ItemgetList()
public
static getList(string $category[, string|null $roleCode = null ]) : array<string|int, mixed>|null
Parameters
- $category : string
- $roleCode : string|null = null
Return values
array<string|int, mixed>|nullpreparePromptCollection()
public
static preparePromptCollection(Collection $prompts[, bool $needSections = true ]) : array<string|int, mixed>|null
Parameters
- $prompts : Collection
- $needSections : bool = true
Return values
array<string|int, mixed>|nullsortBySection()
public
static sortBySection(array<string|int, mixed> $result) : array<string|int, mixed>
Parameters
- $result : array<string|int, mixed>