Bitrix API

TextField extends StringField

Entity field class for text data type

Tags
subpackage

main

Table of Contents

Methods

__construct()  : mixed
TextField constructor.
addFetchDataModifier()  : $this
addSaveDataModifier()  : $this
addValidator()  : $this
cast()  : string
Casts value strictly to field type.
configureAutocomplete()  : $this
configureBinary()  : ScalarField
configureColumnName()  : $this
configureDefaultValue()  : $this
configureFormat()  : $this
configureLong()  : $this
configureNullable()  : ScalarField
configurePrimary()  : $this
configurePrivate()  : ScalarField
configureRequired()  : $this
configureSerialized()  : $this
configureSize()  : $this
configureTitle()  : $this
Lang phrase
configureUnique()  : $this
convertValueFromDb()  : string
Returns value converted from SQL raw result.
convertValueToDb()  : string
Returns raw SQL with escaped and quoted value.
getClassByOldDataType()  : bool
getColumnName()  : mixed
getConnection()  : Connection
getDataType()  : null|string
getDefaultValue()  : callable|mixed|null
getEntity()  : mixed
getFetchDataModifiers()  : array<string|int, mixed>|array<string|int, callable>|null
getFormat()  : null|string
Shortcut for Regexp validator
getGetterTypeHint()  : string
getLangCode()  : mixed
getName()  : mixed
getOldDataTypeByClass()  : bool
getOldDataTypeByField()  : bool
getParameter()  : mixed
getParentField()  : Field
getSaveDataModifiers()  : array<string|int, mixed>|array<string|int, callable>|null
getSetterTypeHint()  : string
getSize()  : int|null
Returns the size of the field in a database (in characters).
getTitle()  : mixed
getTypeMask()  : int
getValidators()  : array<string|int, mixed>|array<string|int, Validator>|array<string|int, callable>
hasParameter()  : mixed
isAutocomplete()  : mixed
isBinary()  : bool
isLong()  : bool
isNullable()  : bool
isPrimary()  : mixed
isPrivate()  : bool
isRequired()  : mixed
isSerialized()  : bool
isUnique()  : mixed
isValueEmpty()  : mixed
modifyValueBeforeSave()  : mixed
postInitialize()  : null
Called after being initialized by Entity
resetEntity()  : mixed
serialize()  : mixed
setColumnName()  : mixed
setConnection()  : mixed
setEntity()  : mixed
setName()  : mixed
setParameter()  : mixed
setParentField()  : mixed
setSerialized()  : mixed
unserialize()  : mixed
validateValue()  : Result

Methods

__construct()

TextField constructor.

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

deprecated, use configure* and add* methods 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) : string
Parameters
$value : mixed
Return values
string

configureAutocomplete()

public configureAutocomplete([bool $value = true ]) : $this
Parameters
$value : bool = true
Return values
$this

configureColumnName()

public configureColumnName(string $value) : $this
Parameters
$value : string
Return values
$this

configureDefaultValue()

public configureDefaultValue(callable|mixed $value) : $this
Parameters
$value : callable|mixed
Return values
$this

configureFormat()

public configureFormat(mixed $format) : $this
Parameters
$format : mixed
Return values
$this

configureLong()

public configureLong([mixed $long = true ]) : $this
Parameters
$long : mixed = true
Return values
$this

configurePrimary()

public configurePrimary([bool $value = true ]) : $this
Parameters
$value : bool = true
Return values
$this

configureRequired()

public configureRequired([bool $value = true ]) : $this
Parameters
$value : bool = true
Return values
$this

configureSerialized()

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

configureSize()

public configureSize(mixed $size) : $this
Parameters
$size : mixed
Return values
$this

configureTitle()

Lang phrase

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

configureUnique()

public configureUnique([bool $value = true ]) : $this
Parameters
$value : bool = true
Return values
$this

convertValueFromDb()

Returns value converted from SQL raw result.

public convertValueFromDb(mixed $value) : string
Parameters
$value : mixed
Tags
throws
SystemException
Return values
string

convertValueToDb()

Returns raw SQL with escaped and quoted value.

public convertValueToDb(string $value) : string
Parameters
$value : string
Tags
throws
SystemException
Return values
string

getClassByOldDataType()

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

getDataType()

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

getDefaultValue()

public getDefaultValue([array<string|int, mixed> $row = null ]) : callable|mixed|null
Parameters
$row : array<string|int, mixed> = null

ORM data row in case of dependency value on other values

Return values
callable|mixed|null

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

getFormat()

Shortcut for Regexp validator

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

getGetterTypeHint()

public getGetterTypeHint() : string
Return values
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

getSetterTypeHint()

public getSetterTypeHint() : string
Return values
string

getSize()

Returns the size of the field in a database (in characters).

public getSize() : int|null
Return values
int|null

getTitle()

public getTitle() : mixed

getTypeMask()

public getTypeMask() : int
Return values
int

getValidators()

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

hasParameter()

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

isBinary()

public isBinary() : bool
Return values
bool

isLong()

public isLong() : bool
Return values
bool

isNullable()

public isNullable() : bool
Return values
bool

isPrivate()

public isPrivate() : bool
Return values
bool

isSerialized()

public isSerialized() : bool
Return values
bool

isValueEmpty()

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

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

resetEntity()

public resetEntity() : mixed

serialize()

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

setColumnName()

public setColumnName(string $column_name) : mixed
Parameters
$column_name : string

setConnection()

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

setEntity()

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

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
Tags
throws
SystemException
Return values
Result

        
On this page

Search results