ListsDataManager extends DataManager
Table of Contents
Constants
- CACHE_PATH = '/bx/imopenlines/quick/main/'
- CACHE_TTL = 7200
- IBLOCK_CODE = 'IMOP_QUICK_ANSWERS'
- RIGHTS_IBLOCK_FOR_LINE_QUEUE = 'iblock_limited_edit'
- RIGHTS_XML_ID = 'LINE_QUEUE_AND_HEADS'
- TYPE = 'lists'
Methods
- __construct() : mixed
- ListsDataManager constructor.
- add() : bool
- Adds new record to the Iblock.
- createStorage() : bool
- Creates new list and iblock.
- delete() : bool
- Delete record on id.
- getById() : bool|mixed|null
- Returns record from iblock on id.
- getCount() : int
- Returns count of all records
- getIblockId() : mixed
- getList() : array<string|int, mixed>|bool
- Returns list of records from the iblock.
- getSectionList() : array<string|int, mixed>
- Returns list of sections for current iblock.
- getStorageList() : array<string|int, mixed>
- Returns array of iblock descriptions that can be used as list for quick answers
- getUrlToList() : string
- Return url to the manage List in public.
- isHasRights() : bool
- Returns true ic current user has rights to work with current list.
- update() : bool
- Updates record.
- updateIblockRights() : bool
- Updates rights to the iblock with ID=$iblockId.
Constants
CACHE_PATH
public
mixed
CACHE_PATH
= '/bx/imopenlines/quick/main/'
CACHE_TTL
public
mixed
CACHE_TTL
= 7200
IBLOCK_CODE
public
mixed
IBLOCK_CODE
= 'IMOP_QUICK_ANSWERS'
RIGHTS_IBLOCK_FOR_LINE_QUEUE
public
mixed
RIGHTS_IBLOCK_FOR_LINE_QUEUE
= 'iblock_limited_edit'
RIGHTS_XML_ID
public
mixed
RIGHTS_XML_ID
= 'LINE_QUEUE_AND_HEADS'
TYPE
public
mixed
TYPE
= 'lists'
Methods
__construct()
ListsDataManager constructor.
public
__construct(int $lineId) : mixed
Parameters
- $lineId : int
Tags
add()
Adds new record to the Iblock.
public
add(array<string|int, mixed> $data) : bool
Parameters
- $data : array<string|int, mixed>
Return values
boolcreateStorage()
Creates new list and iblock.
public
static createStorage(int $lineId[, int $userId = 0 ]) : bool
Parameters
- $lineId : int
- $userId : int = 0
Return values
booldelete()
Delete record on id.
public
delete(mixed $id) : bool
Parameters
- $id : mixed
Return values
boolgetById()
Returns record from iblock on id.
public
getById(mixed $id) : bool|mixed|null
Parameters
- $id : mixed
Return values
bool|mixed|nullgetCount()
Returns count of all records
public
getCount([array<string|int, mixed> $filter = array() ]) : int
Parameters
- $filter : array<string|int, mixed> = array()
Return values
intgetIblockId()
public
getIblockId() : mixed
getList()
Returns list of records from the iblock.
public
getList([array<string|int, mixed> $filter = array() ][, int $offset = 0 ][, int $limit = 0 ]) : array<string|int, mixed>|bool
Parameters
- $filter : array<string|int, mixed> = array()
- $offset : int = 0
- $limit : int = 0
Return values
array<string|int, mixed>|boolgetSectionList()
Returns list of sections for current iblock.
public
getSectionList() : array<string|int, mixed>
Return values
array<string|int, mixed>getStorageList()
Returns array of iblock descriptions that can be used as list for quick answers
public
static getStorageList() : array<string|int, mixed>
Return values
array<string|int, mixed>getUrlToList()
Return url to the manage List in public.
public
getUrlToList() : string
Return values
stringisHasRights()
Returns true ic current user has rights to work with current list.
public
isHasRights() : bool
Return values
boolupdate()
Updates record.
public
update(mixed $id, mixed $data) : bool
Parameters
- $id : mixed
- $data : mixed
Return values
boolupdateIblockRights()
Updates rights to the iblock with ID=$iblockId.
public
static updateIblockRights(int $iblockId) : bool
Users from all lines with this iblockId as a storage for quick answers get edit rights.
Parameters
- $iblockId : int