Bitrix API

ElementV1Entity extends ElementEntity

Base entity

Tags
subpackage

iblock

Table of Contents

Constants

DEFAULT_OBJECT_PREFIX  = 'EO_'

Methods

__clone()  : mixed
addField()  : Field|false
camel2snake()  : string
cleanCache()  : mixed
Cleans all cache entries for the entity.
compileCollectionClass()  : Collection|string
compileDbTableStructureDump()  : array<string|int, string>
compileEntity()  : Entity
compileObjectClass()  : EntityObject|string
createCollection()  : null
createDbTable()  : void
Creates table according to Fields collection
createObject()  : null
destroy()  : bool
enableFullTextIndex()  : mixed
Sets a flag indicating full text index support for a field.
fullTextIndexEnabled()  : bool
Returns true if full text index is enabled for a field.
get()  : Entity
Returns entity object
getAutoIncrement()  : mixed
getCacheTtl()  : int
Returns cache TTL for the entity, possibly limited by the .settings.php: 'cache_flags' => array('value'=> array( "b_group_max_ttl" => 200, "b_group_min_ttl" => 100, )) Maximum is a higher-priority.
getCode()  : mixed
getCollectionClass()  : Collection|string
getCollectionClassName()  : Collection|string
getConnection()  : Connection
getDataClass()  : DataManager|string
getDBTableName()  : mixed
getDefaultCollectionClassName()  : mixed
getDefaultObjectClassName()  : mixed
getEntityClassParts()  : mixed
getField()  : Field|ScalarField
getFields()  : mixed
getFullName()  : mixed
getIblock()  : EO_Iblock
getInstance()  : Entity
getInstanceByQuery()  : Entity
getLangCode()  : mixed
getModule()  : mixed
getMultiValueTableName()  : mixed
getName()  : mixed
getNamespace()  : mixed
getObjectClass()  : EntityObject|string
Returns class of Object for current entity.
getObjectClassName()  : EntityObject|string
Returns class name of Object for current entity.
getPrimary()  : mixed
getPrimaryArray()  : mixed
getReferencesCountTo()  : mixed
getReferencesTo()  : mixed
getScalarFields()  : array<string|int, ScalarField>
getSingleValueTableName()  : mixed
getTitle()  : mixed
getUfId()  : mixed
getUField()  : UField
has()  : bool
Checks if entity exists
hasField()  : mixed
hasUField()  : bool
initialize()  : mixed
initializeField()  : Field
Fields factory
isExists()  : mixed
isUtm()  : mixed
isUts()  : mixed
normalizeEntityClass()  : string|DataManager
normalizeName()  : mixed
onUserTypeChange()  : mixed
postInitialize()  : mixed
readFromCache()  : ArrayResult|null
Reads data from cache.
reinitialize()  : mixed
Reinitializing entity object for another Table class.
setDefaultScope()  : Query
setIblock()  : mixed
snake2camel()  : mixed
wakeUpCollection()  : null
wakeUpObject()  : null
writeToCache()  : ArrayResult

Constants

DEFAULT_OBJECT_PREFIX

public mixed DEFAULT_OBJECT_PREFIX = 'EO_'

Methods

__clone()

public __clone() : mixed

addField()

public addField(array<string|int, mixed>|Field $fieldInfo[, null|string $fieldName = null ]) : Field|false
Parameters
$fieldInfo : array<string|int, mixed>|Field
$fieldName : null|string = null
Tags
throws
ArgumentException
throws
SystemException
Return values
Field|false

camel2snake()

public static camel2snake(mixed $str) : string

Use Bitrix\StringHelper::camel2snake instead

Parameters
$str : mixed
Return values
string

cleanCache()

Cleans all cache entries for the entity.

public cleanCache() : mixed

compileCollectionClass()

public static compileCollectionClass(mixed $dataClass) : Collection|string
Parameters
$dataClass : mixed
Return values
Collection|string

compileDbTableStructureDump()

public compileDbTableStructureDump() : array<string|int, string>
Tags
throws
SystemException
Return values
array<string|int, string>

Array of SQL queries

compileEntity()

public static compileEntity(string $entityName[, null|array<string|int, array<string|int, mixed>>|array<string|int, Field$fields = null ][, array<string|int, mixed> $parameters = array() ]) : Entity
Parameters
$entityName : string
$fields : null|array<string|int, array<string|int, mixed>>|array<string|int, Field> = null
$parameters : array<string|int, mixed> = array()

[namespace, table_name, uf_id, parent, parent_map, default_scope]

Tags
throws
ArgumentException
throws
SystemException
Return values
Entity

compileObjectClass()

public static compileObjectClass(mixed $dataClass) : EntityObject|string
Parameters
$dataClass : mixed
Return values
EntityObject|string

createCollection()

public createCollection() : null
Return values
null

Actual type should be annotated by orm:annotate

createDbTable()

Creates table according to Fields collection

public createDbTable() : void
Tags
throws
SystemException

createObject()

public createObject([bool $setDefaultValues = true ]) : null
Parameters
$setDefaultValues : bool = true
Return values
null

Actual type should be annotated by orm:annotate

destroy()

public static destroy(Entity|string $entity) : bool
Parameters
$entity : Entity|string
Return values
bool

enableFullTextIndex()

Sets a flag indicating full text index support for a field.

public enableFullTextIndex(string $field[, bool $mode = true ]) : mixed

Does nothing, mysql 5.6 has fulltext always enabled.

Parameters
$field : string
$mode : bool = true

fullTextIndexEnabled()

Returns true if full text index is enabled for a field.

public fullTextIndexEnabled(string $field) : bool

Always returns true, mysql 5.6 has fulltext always enabled.

Parameters
$field : string
Return values
bool

get()

Returns entity object

public static get(mixed $entityName) : Entity
Parameters
$entityName : mixed
Tags
throws
ArgumentException
throws
SystemException
Return values
Entity

getAutoIncrement()

public getAutoIncrement() : mixed

getCacheTtl()

Returns cache TTL for the entity, possibly limited by the .settings.php: 'cache_flags' => array('value'=> array( "b_group_max_ttl" => 200, "b_group_min_ttl" => 100, )) Maximum is a higher-priority.

public getCacheTtl(int $ttl) : int
Parameters
$ttl : int

Preferable TTL

Return values
int

Calculated TTL

getCode()

public getCode() : mixed

getDBTableName()

public getDBTableName() : mixed

getDefaultCollectionClassName()

public static getDefaultCollectionClassName(mixed $entityName) : mixed
Parameters
$entityName : mixed

getDefaultObjectClassName()

public static getDefaultObjectClassName(mixed $entityName) : mixed
Parameters
$entityName : mixed

getEntityClassParts()

public static getEntityClassParts(mixed $class) : mixed
Parameters
$class : mixed

getFields()

public getFields() : mixed

getFullName()

public getFullName() : mixed

getIblock()

public getIblock() : EO_Iblock
Return values
EO_Iblock

getInstance()

public static getInstance(string $entityName) : Entity
Parameters
$entityName : string
Tags
static
throws
ArgumentException
throws
SystemException
Return values
Entity

getInstanceByQuery()

public static getInstanceByQuery(Query $query[, null &$entity_name = null ]) : Entity
Parameters
$query : Query
$entity_name : null = null
Tags
throws
ArgumentException
throws
SystemException
Return values
Entity

getLangCode()

public getLangCode() : mixed

getModule()

public getModule() : mixed

getName()

public getName() : mixed

getNamespace()

public getNamespace() : mixed

getObjectClassName()

Returns class name of Object for current entity.

public getObjectClassName() : EntityObject|string
Return values
EntityObject|string

getPrimary()

public getPrimary() : mixed

getPrimaryArray()

public getPrimaryArray() : mixed

getReferencesCountTo()

public getReferencesCountTo(mixed $refEntityName) : mixed
Parameters
$refEntityName : mixed

getReferencesTo()

public getReferencesTo(mixed $refEntityName) : mixed
Parameters
$refEntityName : mixed

getTitle()

public getTitle() : mixed

getUfId()

public getUfId() : mixed

getUField()

public getUField(mixed $name) : UField
Parameters
$name : mixed
Tags
throws
ArgumentException
throws
SystemException
Return values
UField

has()

Checks if entity exists

public static has(mixed $entityName) : bool
Parameters
$entityName : mixed
Return values
bool

hasField()

public hasField(mixed $name) : mixed
Parameters
$name : mixed

hasUField()

public hasUField(mixed $name) : bool
Parameters
$name : mixed
Tags
throws
SystemException
Return values
bool

initialize()

public initialize(mixed $className) : mixed
Parameters
$className : mixed

initializeField()

Fields factory

public initializeField(string $fieldName, array<string|int, mixed>|Field $fieldInfo) : Field
Parameters
$fieldName : string
$fieldInfo : array<string|int, mixed>|Field
Tags
throws
ArgumentException
throws
SystemException
Return values
Field

isExists()

public static isExists(mixed $name) : mixed
Parameters
$name : mixed

normalizeEntityClass()

public static normalizeEntityClass(mixed $entityName) : string|DataManager
Parameters
$entityName : mixed
Return values
string|DataManager

normalizeName()

public static normalizeName(mixed $entityName) : mixed
Parameters
$entityName : mixed

onUserTypeChange()

public static onUserTypeChange(mixed $userfield[, mixed $id = null ]) : mixed
Parameters
$userfield : mixed
$id : mixed = null

postInitialize()

public postInitialize() : mixed
Tags
throws
ArgumentException
throws
SystemException

readFromCache()

Reads data from cache.

public readFromCache(int $ttl, string $cacheId[, bool $countTotal = false ]) : ArrayResult|null
Parameters
$ttl : int

TTL.

$cacheId : string

The cache ID.

$countTotal : bool = false

Whether to read total count from the cache.

Return values
ArrayResult|null

reinitialize()

Reinitializing entity object for another Table class.

public reinitialize(mixed $className) : mixed

Can be useful for complex inheritance with cloning.

Parameters
$className : mixed

setIblock()

public setIblock(EO_Iblock $iblock) : mixed
Parameters
$iblock : EO_Iblock
Tags
throws
ArgumentException

snake2camel()

public static snake2camel(mixed $str) : mixed

Use Bitrix\StringHelper::snake2camel instead

Parameters
$str : mixed

wakeUpCollection()

public wakeUpCollection(mixed $rows) : null
Parameters
$rows : mixed
Tags
see
Collection::wakeUp()
throws
ArgumentException
throws
SystemException
Return values
null

Actual type should be annotated by orm:annotate

wakeUpObject()

public wakeUpObject(mixed $row) : null
Parameters
$row : mixed
Tags
see
EntityObject::wakeUp()
throws
ArgumentException
throws
SystemException
Return values
null

Actual type should be annotated by orm:annotate

writeToCache()

public writeToCache(Result $result, string $cacheId[, bool $countTotal = false ]) : ArrayResult
Parameters
$result : Result

A query result to cache.

$cacheId : string

The cache ID.

$countTotal : bool = false

Whether to write total count to the cache.

Tags
throws
ObjectPropertyException
throws
SystemException
Return values
ArrayResult

        
On this page

Search results