Bitrix API

ConfigurableModel extends Model

AbstractYes

Common class for models which have configurations sub entities

Table of Contents

Constants

ATTRIBUTE_SLICE_DELIMITER  = '__'

Methods

__call()  : void
Implement delete and add actions for nested relations.
__construct()  : mixed
Model constructor.
addConfigurationField()  : void
Build configuration entity from valuable $field and add to configurations list
addConfigurations()  : void
delete()  : bool|null
deleteConfigurations()  : void
factoryWithHorizontalCells()  : mixed
getClassName()  : string
getConfigurations()  : array<string|int, Configuration>
getCreatedAt()  : DateTime
getCurrentDbState()  : array<string|int, mixed>
getErrors()  : array<string|int, mixed>
Get Errors collections.
getId()  : mixed
getMapAttributes()  : array<string|int, mixed>
Returns the list of pair for mapping data and object properties.
getMapReferenceAttributes()  : array<string|int, mixed>
Returns map of lazy loaded attributes of current model.
getTableClassName()  : string|DataManager
Gets the fully qualified name of table class which belongs to current model.
getUpdatedAt()  : DateTime
load()  : static
loadAttribute()  : void
loadById()  : static
save()  : Model
setConfigurations()  : void
Setter for Configuration colection.
setCreatedAt()  : void
setId()  : void
setUpdatedAt()  : void

Constants

ATTRIBUTE_SLICE_DELIMITER

public mixed ATTRIBUTE_SLICE_DELIMITER = '__'

Methods

__call()

Implement delete and add actions for nested relations.

public __call(string $name, array<string|int, mixed> $arguments) : void
Parameters
$name : string

Getter name.

$arguments : array<string|int, mixed>

Arguments passed to getter.

__construct()

Model constructor.

public __construct() : mixed

addConfigurationField()

Build configuration entity from valuable $field and add to configurations list

public addConfigurationField(BaseValuable $field) : void
Parameters
$field : BaseValuable

Field from create configuration.

delete()

public delete() : bool|null
Return values
bool|null

factoryWithHorizontalCells()

public static factoryWithHorizontalCells([mixed $cellCount = 1 ]) : mixed
Parameters
$cellCount : mixed = 1

getClassName()

public static getClassName() : string
Return values
string

getCurrentDbState()

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

getErrors()

Get Errors collections.

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

getId()

public getId() : mixed

getMapAttributes()

Returns the list of pair for mapping data and object properties.

public static getMapAttributes() : array<string|int, mixed>

Key is field in DataManager, value is object property.

Return values
array<string|int, mixed>

getMapReferenceAttributes()

Returns map of lazy loaded attributes of current model.

public static getMapReferenceAttributes() : array<string|int, mixed>

supported relation types ONE_TO_MANY, MANY_TO_ONE, MANY_TO_MANY example: array( 'lazyLoadAttributeName_1' => array( 'type' => Common::ONE_TO_MANY, 'targetEntity' => TargetEntityClass::getClassName(), //inheritor of this class 'mappedBy' => 'targetEntityField', ), 'lazyLoadAttributeName_2' => array( 'type' => Common::MANY_TO_ONE, 'targetEntity' => TargetEntityClass::getClassName(), //inheritor of this class 'inveredBy' => '', 'join' => array( 'field' => array('thisFieldName', 'relationEntityFieldMame') ) ), 'lazyLoadAttributeName_1' => array( 'type' => Common::MANY_TO_MANY, 'targetEntity' => TargetEntityClass::getClassName(), //inheritor of this class 'join' => array( 'tableClassName' => TableClassName::getClassName //Supporting table ORM class name for connecting 2 entities 'column' => array(SUPPORTING_CONNECT_COLUMN => array('thisPrimaryFieldName', 'SUPPORTING_TABLE_APPROPRIATE_FIELD_NAME')), 'inverseColumn' => array(SUPPORTING_CONNECT_COLUMN => array('relationEntityPrimaryFieldName', 'SUPPORTING_TABLE_APPROPRIATE_FIELD_NAME')), ), ) )

Return values
array<string|int, mixed>

getTableClassName()

Gets the fully qualified name of table class which belongs to current model.

public static getTableClassName() : string|DataManager
Tags
throws
NotImplementedException
Return values
string|DataManager

load()

public static load(array<string|int, mixed>|ConditionTree $filter[, array<string|int, mixed> $with = array() ][, array<string|int, mixed> $order = array() ]) : static
Parameters
$filter : array<string|int, mixed>|ConditionTree

Filter parameters.

$with : array<string|int, mixed> = array()

Relation keys to load.

$order : array<string|int, mixed> = array()

Order parameters.

Return values
static

loadAttribute()

public loadAttribute(string $attributeName) : void
Parameters
$attributeName : string

Attribute name to load to property from db.

loadById()

public static loadById(mixed $id) : static
Parameters
$id : mixed

Load entity by id.

Return values
static

setConfigurations()

Setter for Configuration colection.

public setConfigurations(array<string|int, Configuration$configurations) : void
Parameters
$configurations : array<string|int, Configuration>

Configuration list.

setCreatedAt()

public setCreatedAt(DateTime $createdAt) : void
Parameters
$createdAt : DateTime

Record create time.

setId()

public setId(mixed $id) : void
Parameters
$id : mixed

Id property value.

setUpdatedAt()

public setUpdatedAt(DateTime $updatedAt) : void
Parameters
$updatedAt : DateTime

Record update time.


        
On this page

Search results