Entity
AbstractYes
Table of Contents
Constants
- EVENT_ON_BUILD_CACHED_FIELD_LIST = 'OnBuildCachedFieldList'
- FIELDS_ALL = self::FIELDS_MAIN | self::FIELDS_UF
- FIELDS_MAIN = 0x1
- FIELDS_UF = 0x2
- PREFIX_OLD = 'OLD_'
Methods
- __construct() : mixed
- add() : AddResult
- Add entity item. Use instead of DataManager method.
- clearCache() : void
- Clear all cache for entity.
- clearCacheItem() : void
- Clear item cache. Do not use without good reason.
- clearSettings() : void
- delete() : DeleteResult
- Delete entity item. Use instead of DataManager method.
- fetch() : array<string|int, mixed>|false
- Entity fetch. Work with entity change cache.
- getCachedFieldList() : array<string|int, mixed>
- Returns fields list in cache.
- getCacheItem() : array<string|int, mixed>|null
- Returns item cache.
- getCallbackRestEvent() : array<string|int, mixed>
- getEntity() : Entity
- Returns entity class.
- getList() : Entity
- Entity getList with change cache. Need for use before add/update/delete entity row.
- getRow() : array<string|int, mixed>|null
- Entity getRow with change cache. Wrapper for entity getList.
- getTabletClassName() : string
- Returns entity tablet name.
- getTabletFieldNames() : array<string|int, mixed>
- Returns list of tablet field names, include user fields.
- setCacheItem() : void
- Fill item cache data. Do not use without good reason.
- update() : UpdateResult
- Update entity item. Use instead of DataManager method.
Constants
EVENT_ON_BUILD_CACHED_FIELD_LIST
public
mixed
EVENT_ON_BUILD_CACHED_FIELD_LIST
= 'OnBuildCachedFieldList'
FIELDS_ALL
public
mixed
FIELDS_ALL
= self::FIELDS_MAIN | self::FIELDS_UF
FIELDS_MAIN
public
mixed
FIELDS_MAIN
= 0x1
FIELDS_UF
public
mixed
FIELDS_UF
= 0x2
PREFIX_OLD
public
mixed
PREFIX_OLD
= 'OLD_'
Methods
__construct()
public
__construct() : mixed
add()
Add entity item. Use instead of DataManager method.
public
static add(array<string|int, mixed> $data) : AddResult
Parameters
- $data : array<string|int, mixed>
Return values
AddResultclearCache()
Clear all cache for entity.
public
static clearCache() : void
clearCacheItem()
Clear item cache. Do not use without good reason.
public
static clearCacheItem(int $id) : void
Parameters
- $id : int
Tags
clearSettings()
public
static clearSettings() : void
delete()
Delete entity item. Use instead of DataManager method.
public
static delete(int $id) : DeleteResult
Parameters
- $id : int
Return values
DeleteResultfetch()
Entity fetch. Work with entity change cache.
public
fetch([Converter|null $converter = null ]) : array<string|int, mixed>|false
Parameters
- $converter : Converter|null = null
Return values
array<string|int, mixed>|falsegetCachedFieldList()
Returns fields list in cache.
public
static getCachedFieldList() : array<string|int, mixed>
Return values
array<string|int, mixed>getCacheItem()
Returns item cache.
public
static getCacheItem(int $id[, bool $load = false ]) : array<string|int, mixed>|null
Parameters
- $id : int
- $load : bool = false
Return values
array<string|int, mixed>|nullgetCallbackRestEvent()
public
static getCallbackRestEvent() : array<string|int, mixed>
Return values
array<string|int, mixed>getEntity()
Returns entity class.
public
static getEntity() : Entity
Return values
EntitygetList()
Entity getList with change cache. Need for use before add/update/delete entity row.
public
static getList(array<string|int, mixed> $parameters) : Entity
Parameters
- $parameters : array<string|int, mixed>
Tags
Return values
EntitygetRow()
Entity getRow with change cache. Wrapper for entity getList.
public
static getRow(array<string|int, mixed> $parameters) : array<string|int, mixed>|null
Parameters
- $parameters : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>|nullgetTabletClassName()
Returns entity tablet name.
public
static getTabletClassName() : string
Return values
stringgetTabletFieldNames()
Returns list of tablet field names, include user fields.
public
static getTabletFieldNames([int $fields = self::FIELDS_MAIN ]) : array<string|int, mixed>
Parameters
- $fields : int = self::FIELDS_MAIN
Return values
array<string|int, mixed>setCacheItem()
Fill item cache data. Do not use without good reason.
public
static setCacheItem(int $id, array<string|int, mixed> $row) : void
Parameters
- $id : int
- $row : array<string|int, mixed>
update()
Update entity item. Use instead of DataManager method.
public
static update(int $id, array<string|int, mixed> $data) : UpdateResult
Parameters
- $id : int
- $data : array<string|int, mixed>