Bitrix API

ExpressionField extends Field implements IReadable

Expr field is to describe dynamic fields by expression, e.g. we have PRICE_USD field and need to count price in EUR then we define expression field PRICE_EUR with expression = array('%s * 1.25', 'PRICE_USD')

Tags
subpackage

main

Table of Contents

Interfaces

IReadable
Interface for Entity Fields to be filtered by Query.

Methods

__call()  : mixed
__clone()  : mixed
__construct()  : mixed
All fields in expression should be placed as %s (or as another placeholder for sprintf), and the real field names being carrying in $buildFrom array (= args for sprintf)
addFetchDataModifier()  : $this
addSaveDataModifier()  : $this
addValidator()  : $this
cast()  : mixed
Casts value strictly to field type.
checkAggregation()  : mixed
checkSubquery()  : mixed
configureSerialized()  : $this
configureTitle()  : $this
Lang phrase
configureValueField()  : $this
configureValueType()  : $this
convertValueFromDb()  : mixed
Returns value converted from SQL raw result.
convertValueToDb()  : string
Returns raw SQL with escaped and quoted value.
getBuildFrom()  : array<string|int, mixed>
getBuildFromChains()  : array<string|int, Chain>
getClassByOldDataType()  : bool
getConnection()  : Connection
getDataType()  : null|string
getEntity()  : mixed
getExpression()  : mixed
getFetchDataModifiers()  : array<string|int, mixed>|array<string|int, callable>|null
getFullExpression()  : mixed|string
getLangCode()  : mixed
getName()  : mixed
getOldDataTypeByClass()  : bool
getOldDataTypeByField()  : bool
getParameter()  : mixed
getParentField()  : Field
getSaveDataModifiers()  : array<string|int, mixed>|array<string|int, callable>|null
getTitle()  : mixed
getTypeMask()  : mixed
getValidators()  : array<string|int, callable>|array<string|int, Validator>
getValueField()  : ScalarField
getValueType()  : string
hasParameter()  : mixed
hasSubquery()  : bool
isAggregated()  : bool
isConstant()  : mixed
isSerialized()  : bool
modifyValueBeforeSave()  : mixed
postInitialize()  : null
Called after being initialized by Entity
removeSubqueries()  : mixed
resetEntity()  : mixed
serialize()  : mixed
setConnection()  : mixed
setEntity()  : mixed
setName()  : mixed
setParameter()  : mixed
setParentField()  : mixed
setSerialized()  : mixed
unserialize()  : mixed
validateValue()  : Result

Methods

__call()

public __call(mixed $name, mixed $arguments) : mixed
Parameters
$name : mixed
$arguments : mixed

__construct()

All fields in expression should be placed as %s (or as another placeholder for sprintf), and the real field names being carrying in $buildFrom array (= args for sprintf)

public __construct(string $name, string $expression[, array<string|int, mixed>|string|null $buildFrom = null ][, array<string|int, mixed> $parameters = array() ]) : mixed
Parameters
$name : string
$expression : string
$buildFrom : array<string|int, mixed>|string|null = null
$parameters : array<string|int, mixed> = array()

deprecated, use configure* and add* instead

Tags
throws
SystemException

addFetchDataModifier()

public addFetchDataModifier(callable $modifier) : $this
Parameters
$modifier : callable
Tags
throws
SystemException
Return values
$this

addSaveDataModifier()

public addSaveDataModifier(callable $modifier) : $this
Parameters
$modifier : callable
Tags
throws
SystemException
Return values
$this

addValidator()

public addValidator(Validator|callable $validator) : $this
Parameters
$validator : Validator|callable
Tags
throws
SystemException
Return values
$this

cast()

Casts value strictly to field type.

public cast(mixed $value) : mixed
Parameters
$value : mixed

checkAggregation()

public static checkAggregation(mixed $expression) : mixed
Parameters
$expression : mixed

checkSubquery()

public static checkSubquery(mixed $expression) : mixed
Parameters
$expression : mixed

configureSerialized()

public configureSerialized() : $this
Tags
throws
SystemException
Return values
$this

configureTitle()

Lang phrase

public configureTitle(mixed $title) : $this
Parameters
$title : mixed
Return values
$this

configureValueType()

public configureValueType(mixed $class) : $this
Parameters
$class : mixed
Return values
$this

convertValueFromDb()

Returns value converted from SQL raw result.

public convertValueFromDb(mixed $value) : mixed
Parameters
$value : mixed

convertValueToDb()

Returns raw SQL with escaped and quoted value.

public convertValueToDb(mixed $value) : string
Parameters
$value : mixed
Return values
string

getBuildFrom()

public getBuildFrom() : array<string|int, mixed>
Return values
array<string|int, mixed>

getBuildFromChains()

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

getClassByOldDataType()

public static getClassByOldDataType(mixed $dateType) : bool
Parameters
$dateType : mixed
Return values
bool

getDataType()

public getDataType() : null|string
Return values
null|string

getEntity()

public getEntity() : mixed

getFetchDataModifiers()

public getFetchDataModifiers() : array<string|int, mixed>|array<string|int, callable>|null
Tags
throws
SystemException
Return values
array<string|int, mixed>|array<string|int, callable>|null

getFullExpression()

public getFullExpression() : mixed|string
Tags
throws
SystemException
Return values
mixed|string

getLangCode()

public getLangCode() : mixed

getName()

public getName() : mixed

getOldDataTypeByClass()

public static getOldDataTypeByClass(mixed $class) : bool
Parameters
$class : mixed
Return values
bool

getOldDataTypeByField()

public static getOldDataTypeByField(Field $field) : bool
Parameters
$field : Field
Return values
bool

getParameter()

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

getSaveDataModifiers()

public getSaveDataModifiers() : array<string|int, mixed>|array<string|int, callable>|null
Tags
throws
SystemException
Return values
array<string|int, mixed>|array<string|int, callable>|null

getTitle()

public getTitle() : mixed

getValidators()

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

hasParameter()

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

hasSubquery()

public hasSubquery() : bool
Tags
throws
SystemException
Return values
bool

isAggregated()

public isAggregated() : bool
Tags
throws
SystemException
Return values
bool

isSerialized()

public isSerialized() : bool
Return values
bool

modifyValueBeforeSave()

public modifyValueBeforeSave(mixed $value, mixed $data) : mixed
Parameters
$value : mixed
$data : mixed
Tags
throws
SystemException

postInitialize()

Called after being initialized by Entity

public postInitialize() : null
Return values
null

removeSubqueries()

public static removeSubqueries(mixed $expression) : mixed
Parameters
$expression : mixed

resetEntity()

public resetEntity() : mixed

serialize()

public serialize(mixed $value) : mixed
Parameters
$value : mixed

setConnection()

public setConnection(mixed $connection) : mixed
Parameters
$connection : mixed

setEntity()

public setEntity(Entity $entity) : mixed
Parameters
$entity : Entity
Tags
throws
SystemException
throws
ArgumentException

setName()

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

setParameter()

public setParameter(mixed $name, mixed $value) : mixed
Parameters
$name : mixed
$value : mixed

setParentField()

public setParentField(Field $parentField) : mixed
Parameters
$parentField : Field

setSerialized()

public setSerialized() : mixed
Tags
throws
SystemException

unserialize()

public unserialize(mixed $value) : mixed
Parameters
$value : mixed

validateValue()

public validateValue(mixed $value, mixed $primary, mixed $row, Result $result) : Result
Parameters
$value : mixed
$primary : mixed
$row : mixed
$result : Result
Return values
Result

        
On this page

Search results