DealContactTable extends DataManager uses MergeByDefaultTrait
Class DealContactTable
DO NOT WRITE ANYTHING BELOW THIS
<<< ORMENTITYANNOTATION
Table of Contents
Constants
- EVENT_ON_ADD = "OnAdd"
- EVENT_ON_AFTER_ADD = "OnAfterAdd"
- EVENT_ON_AFTER_DELETE = "OnAfterDelete"
- EVENT_ON_AFTER_UPDATE = "OnAfterUpdate"
- EVENT_ON_BEFORE_ADD = "OnBeforeAdd"
- EVENT_ON_BEFORE_DELETE = "OnBeforeDelete"
- EVENT_ON_BEFORE_UPDATE = "OnBeforeUpdate"
- EVENT_ON_DELETE = "OnDelete"
- EVENT_ON_UPDATE = "OnUpdate"
Methods
- add() : AddResult
- Adds row to entity table
- addMulti() : AddResult
- Adds several rows to entity table.
- bindContactIDs() : void
- Bind deal to contacts are specified by ID.
- bindContacts() : void
- Bind deal to contacts.
- checkFields() : mixed
- Checks the data fields before saving to DB. Result stores in the $result object
- cleanCache() : void
- Cleans the tablet cache after data modifications.
- createCollection() : EO_DealContact_Collection
- createObject() : EO_DealContact
- cryptoEnabled() : bool
- Returns true if crypto is enabled for a field.
- delete() : DeleteResult
- Deletes row in entity table by primary key
- enableCrypto() : mixed
- Sets a flag indicating crypto support for a field.
- getBulkDealBindings() : array<string|int, mixed>
- Get binding map for deal's collection.
- getById() : EO_DealContact_Result
- Returns selection by entity's primary key
- getByPrimary() : EO_DealContact_Result
- Returns selection by entity's primary key and optional parameters for getList()
- getCollectionClass() : string|Collection
- Returns class of Object collection for current entity.
- getCollectionClassName() : string
- Returns class name (without namespace) of Object collection for current entity.
- getCollectionParentClass() : Collection|string
- getConnectionName() : string
- Returns connection name for entity
- getContactDealIDs() : array<string|int, mixed>
- Get deal IDs are bound to specified contact.
- getCount() : int
- Performs COUNT query on entity and returns the result.
- getDealBindingCount() : int
- Get deal's binding count.
- getDealBindings() : array<string|int, mixed>
- Get deal's bindings.
- getDealContactIDs() : array<string|int, mixed>
- Get contact IDs are bound to specified deal.
- getDealsContactIds() : array<string|int, mixed>
- getEntity() : EO_DealContact_Entity
- Returns entity object
- getEntityClass() : Entity|string
- getList() : EO_DealContact_Result
- Executes the query and returns selection by parameters of the query. This function is an alias to the Query object functions
- getMap() : array<string|int, mixed>
- Get table fields map.
- getObjectClass() : string|EntityObject
- Returns class of Object for current entity.
- getObjectClassName() : string
- Returns class name (without namespace) of Object for current entity.
- getObjectParentClass() : EntityObject|string
- getQueryClass() : Query|string
- getRow() : array<string|int, mixed>|null
- Returns one row (or null) by parameters for getList()
- getRowById() : array<string|int, mixed>|null
- Returns one row (or null) by entity's primary key
- getTableName() : string
- Get table name.
- getTitle() : string|null
- getUfId() : mixed
- hasContacts() : bool
- Check if deal has contacts.
- isCacheable() : bool
- You can disable cache for the tablet completely.
- isUtm() : mixed
- isUts() : mixed
- onAdd() : mixed
- onAfterAdd() : mixed
- onAfterDelete() : mixed
- onAfterUpdate() : mixed
- onBeforeAdd() : mixed
- onBeforeDelete() : mixed
- onBeforeUpdate() : mixed
- onDelete() : mixed
- onUpdate() : mixed
- postInitialize() : null
- prepareFilterJoinSql() : string
- Prepage SQL join filter condition for specified entity.
- query() : EO_DealContact_Query
- Creates and returns the Query object for the entity
- rebindAllContacts() : mixed
- Unbind all contacts from seed deal and bind to target deal
- rebindAllDeals() : mixed
- Unbind all deals from seed contact and bind to target contact
- setCurrentDeletingObject() : void
- setDefaultScope() : Query
- unbindAllContacts() : void
- Unbind specified deal from all contacts.
- unbindAllDeals() : void
- Unbind specified contact from all deals.
- unbindContactIDs() : void
- Unbind specified deal from specified contacts.
- unbindContacts() : void
- Unbind specified deal from specified contacts.
- unsetEntity() : mixed
- update() : UpdateResult
- Updates row in entity table by primary key
- updateMulti() : UpdateResult
- upsert() : void
- Execute UPSERT operation.
- wakeUpCollection() : EO_DealContact_Collection
- wakeUpObject() : EO_DealContact
Constants
EVENT_ON_ADD
public
mixed
EVENT_ON_ADD
= "OnAdd"
EVENT_ON_AFTER_ADD
public
mixed
EVENT_ON_AFTER_ADD
= "OnAfterAdd"
EVENT_ON_AFTER_DELETE
public
mixed
EVENT_ON_AFTER_DELETE
= "OnAfterDelete"
EVENT_ON_AFTER_UPDATE
public
mixed
EVENT_ON_AFTER_UPDATE
= "OnAfterUpdate"
EVENT_ON_BEFORE_ADD
public
mixed
EVENT_ON_BEFORE_ADD
= "OnBeforeAdd"
EVENT_ON_BEFORE_DELETE
public
mixed
EVENT_ON_BEFORE_DELETE
= "OnBeforeDelete"
EVENT_ON_BEFORE_UPDATE
public
mixed
EVENT_ON_BEFORE_UPDATE
= "OnBeforeUpdate"
EVENT_ON_DELETE
public
mixed
EVENT_ON_DELETE
= "OnDelete"
EVENT_ON_UPDATE
public
mixed
EVENT_ON_UPDATE
= "OnUpdate"
Methods
add()
Adds row to entity table
public
static add(array<string|int, mixed> $data) : AddResult
Parameters
- $data : array<string|int, mixed>
-
An array with fields like array( "fields" => array( "FIELD1" => "value1", "FIELD2" => "value2", ), "auth_context" => \Bitrix\Main\Authentication\Context object ) or just a plain array of fields.
This method uses the default strategy defined in the class.
Tags
Return values
AddResult —Contains ID of inserted row
addMulti()
Adds several rows to entity table.
public
static addMulti(mixed $rows[, bool $ignoreEvents = false ]) : AddResult
This method uses the default strategy defined in the class.
Parameters
- $rows : mixed
- $ignoreEvents : bool = false
Tags
Return values
AddResultbindContactIDs()
Bind deal to contacts are specified by ID.
public
static bindContactIDs(int $dealID, array<string|int, mixed> $contactIDs) : void
Parameters
- $dealID : int
-
Deal ID.
- $contactIDs : array<string|int, mixed>
-
Array of contact IDs.
bindContacts()
Bind deal to contacts.
public
static bindContacts(int $dealID, array<string|int, mixed> $bindings) : void
Parameters
- $dealID : int
-
Deal ID.
- $bindings : array<string|int, mixed>
-
Array of contact bindings.
Tags
checkFields()
Checks the data fields before saving to DB. Result stores in the $result object
public
static checkFields(Result $result, mixed $primary, array<string|int, mixed> $data) : mixed
Parameters
- $result : Result
- $primary : mixed
- $data : array<string|int, mixed>
Tags
cleanCache()
Cleans the tablet cache after data modifications.
public
static cleanCache() : void
createCollection()
public
static createCollection() : EO_DealContact_Collection
Return values
EO_DealContact_CollectioncreateObject()
public
static createObject([mixed $setDefaultValues = = 'true' ]) : EO_DealContact
Parameters
- $setDefaultValues : mixed = = 'true'
Return values
EO_DealContactcryptoEnabled()
Returns true if crypto is enabled for a field.
public
static cryptoEnabled(string $field[, string $table = null ]) : bool
Parameters
- $field : string
- $table : string = null
Return values
booldelete()
Deletes row in entity table by primary key
public
static delete(mixed $primary) : DeleteResult
Parameters
- $primary : mixed
Tags
Return values
DeleteResultenableCrypto()
Sets a flag indicating crypto support for a field.
public
static enableCrypto(string $field[, string $table = null ][, bool $mode = true ]) : mixed
Parameters
- $field : string
- $table : string = null
- $mode : bool = true
getBulkDealBindings()
Get binding map for deal's collection.
public
static getBulkDealBindings(array<string|int, mixed> $dealIDs) : array<string|int, mixed>
Parameters
- $dealIDs : array<string|int, mixed>
-
Array of Deal IDs.
Tags
Return values
array<string|int, mixed>getById()
Returns selection by entity's primary key
public
static getById(mixed $id) : EO_DealContact_Result
Parameters
- $id : mixed
-
Primary key of the entity
Return values
EO_DealContact_ResultgetByPrimary()
Returns selection by entity's primary key and optional parameters for getList()
public
static getByPrimary(mixed $primary[, array<string|int, mixed> $parameters = = '[]' ]) : EO_DealContact_Result
Parameters
- $primary : mixed
-
Primary key of the entity
- $parameters : array<string|int, mixed> = = '[]'
-
Additional parameters for getList()
Return values
EO_DealContact_ResultgetCollectionClass()
Returns class of Object collection for current entity.
public
static getCollectionClass() : string|Collection
Return values
string|CollectiongetCollectionClassName()
Returns class name (without namespace) of Object collection for current entity.
public
final static getCollectionClassName() : string
Return values
stringgetCollectionParentClass()
public
static getCollectionParentClass() : Collection|string
Return values
Collection|stringgetConnectionName()
Returns connection name for entity
public
static getConnectionName() : string
Return values
stringgetContactDealIDs()
Get deal IDs are bound to specified contact.
public
static getContactDealIDs(int $contactID) : array<string|int, mixed>
Parameters
- $contactID : int
-
Contact ID.
Tags
Return values
array<string|int, mixed>getCount()
Performs COUNT query on entity and returns the result.
public
static getCount([array<string|int, mixed>|ConditionTree $filter = array() ][, array<string|int, mixed> $cache = array() ]) : int
Parameters
- $filter : array<string|int, mixed>|ConditionTree = array()
- $cache : array<string|int, mixed> = array()
-
An array of cache options "ttl" => integer indicating cache TTL
Tags
Return values
intgetDealBindingCount()
Get deal's binding count.
public
static getDealBindingCount(mixed $dealID) : int
Parameters
- $dealID : mixed
Tags
Return values
intgetDealBindings()
Get deal's bindings.
public
static getDealBindings(int $dealID) : array<string|int, mixed>
Parameters
- $dealID : int
-
Deal ID.
Tags
Return values
array<string|int, mixed>getDealContactIDs()
Get contact IDs are bound to specified deal.
public
static getDealContactIDs(int $dealID) : array<string|int, mixed>
Parameters
- $dealID : int
-
Deal ID.
Tags
Return values
array<string|int, mixed>getDealsContactIds()
public
static getDealsContactIds(array<string|int, mixed> $dealIds) : array<string|int, mixed>
Parameters
- $dealIds : array<string|int, mixed>
Return values
array<string|int, mixed>getEntity()
Returns entity object
public
static getEntity() : EO_DealContact_Entity
Return values
EO_DealContact_EntitygetEntityClass()
public
static getEntityClass() : Entity|string
Return values
Entity|stringgetList()
Executes the query and returns selection by parameters of the query. This function is an alias to the Query object functions
public
static getList([array<string|int, mixed> $parameters = = '[]' ]) : EO_DealContact_Result
Parameters
- $parameters : array<string|int, mixed> = = '[]'
-
An array of query parameters, available keys are:
"select" => array of fields in the SELECT part of the query, aliases are possible in the form of "alias"=>"field";
"filter" => array of filters in the WHERE/HAVING part of the query in the form of "(condition)field"=>"value"; also could be an instance of Filter;
"group" => array of fields in the GROUP BY part of the query;
"order" => array of fields in the ORDER BY part of the query in the form of "field"=>"asc|desc";
"limit" => integer indicating maximum number of rows in the selection (like LIMIT n in MySql);
"offset" => integer indicating first row number in the selection (like LIMIT n, 100 in MySql);
"runtime" => array of entity fields created dynamically;
"cache => array of cache options:
"ttl" => integer indicating cache TTL;
"cache_joins" => boolean enabling to cache joins, false by default.
Return values
EO_DealContact_ResultgetMap()
Get table fields map.
public
static getMap() : array<string|int, mixed>
Return values
array<string|int, mixed>getObjectClass()
Returns class of Object for current entity.
public
static getObjectClass() : string|EntityObject
Return values
string|EntityObjectgetObjectClassName()
Returns class name (without namespace) of Object for current entity.
public
final static getObjectClassName() : string
Return values
stringgetObjectParentClass()
public
static getObjectParentClass() : EntityObject|string
Return values
EntityObject|stringgetQueryClass()
public
static getQueryClass() : Query|string
Return values
Query|stringgetRow()
Returns one row (or null) by parameters for getList()
public
static getRow(array<string|int, mixed> $parameters) : array<string|int, mixed>|null
Parameters
- $parameters : array<string|int, mixed>
-
Primary key of the entity
Tags
Return values
array<string|int, mixed>|nullgetRowById()
Returns one row (or null) by entity's primary key
public
static getRowById(mixed $id[, array<string|int, mixed> $parameters = [] ]) : array<string|int, mixed>|null
Parameters
- $id : mixed
-
Primary key of the entity
- $parameters : array<string|int, mixed> = []
-
Additional parameters for getList()
Tags
Return values
array<string|int, mixed>|nullgetTableName()
Get table name.
public
static getTableName() : string
Return values
stringgetTitle()
public
static getTitle() : string|null
Return values
string|nullgetUfId()
public
static getUfId() : mixed
hasContacts()
Check if deal has contacts.
public
static hasContacts(int $dealID) : bool
Parameters
- $dealID : int
-
Deal ID.
Tags
Return values
boolisCacheable()
You can disable cache for the tablet completely.
public
static isCacheable() : bool
Return values
boolisUtm()
public
static isUtm() : mixed
isUts()
public
static isUts() : mixed
onAdd()
public
static onAdd(Event $event) : mixed
Parameters
- $event : Event
onAfterAdd()
public
static onAfterAdd(Event $event) : mixed
Parameters
- $event : Event
onAfterDelete()
public
static onAfterDelete(Event $event) : mixed
Parameters
- $event : Event
onAfterUpdate()
public
static onAfterUpdate(Event $event) : mixed
Parameters
- $event : Event
onBeforeAdd()
public
static onBeforeAdd(Event $event) : mixed
Parameters
- $event : Event
onBeforeDelete()
public
static onBeforeDelete(Event $event) : mixed
Parameters
- $event : Event
onBeforeUpdate()
public
static onBeforeUpdate(Event $event) : mixed
Parameters
- $event : Event
onDelete()
public
static onDelete(Event $event) : mixed
Parameters
- $event : Event
onUpdate()
public
static onUpdate(Event $event) : mixed
Parameters
- $event : Event
postInitialize()
public
static postInitialize(Entity $entity) : null
Parameters
- $entity : Entity
Return values
nullprepareFilterJoinSql()
Prepage SQL join filter condition for specified entity.
public
static prepareFilterJoinSql(int $entityTypeID, int $entityID, string $tableAlias) : string
Parameters
- $entityTypeID : int
-
Entity type ID for filter.
- $entityID : int
-
Entity ID for filter.
- $tableAlias : string
-
Alias of primary table.
Tags
Return values
stringquery()
Creates and returns the Query object for the entity
public
static query() : EO_DealContact_Query
Return values
EO_DealContact_QueryrebindAllContacts()
Unbind all contacts from seed deal and bind to target deal
public
static rebindAllContacts(int $seedDealID, int $targDealID) : mixed
Parameters
- $seedDealID : int
-
Seed deal ID.
- $targDealID : int
-
Target deal ID.
Tags
rebindAllDeals()
Unbind all deals from seed contact and bind to target contact
public
static rebindAllDeals(int $seedContactID, int $targContactID) : mixed
Parameters
- $seedContactID : int
-
Seed contact ID.
- $targContactID : int
-
Target contact ID.
Tags
setCurrentDeletingObject()
public
static setCurrentDeletingObject(EntityObject $object) : void
Parameters
- $object : EntityObject
setDefaultScope()
public
static setDefaultScope(Query $query) : Query
Parameters
- $query : Query
Return values
QueryunbindAllContacts()
Unbind specified deal from all contacts.
public
static unbindAllContacts(int $dealID) : void
Parameters
- $dealID : int
-
Deal ID.
Tags
unbindAllDeals()
Unbind specified contact from all deals.
public
static unbindAllDeals(int $contactID) : void
Parameters
- $contactID : int
-
Contact ID.
Tags
unbindContactIDs()
Unbind specified deal from specified contacts.
public
static unbindContactIDs(int $dealID, array<string|int, mixed> $contactIDs) : void
Parameters
- $dealID : int
-
Deal ID.
- $contactIDs : array<string|int, mixed>
-
Array of contact IDs.
Tags
unbindContacts()
Unbind specified deal from specified contacts.
public
static unbindContacts(int $dealID, array<string|int, mixed> $bindings) : void
Parameters
- $dealID : int
-
Deal ID.
- $bindings : array<string|int, mixed>
-
Array of bindings.
Tags
unsetEntity()
public
static unsetEntity(mixed $class) : mixed
Parameters
- $class : mixed
update()
Updates row in entity table by primary key
public
static update(mixed $primary, array<string|int, mixed> $data) : UpdateResult
Parameters
- $primary : mixed
- $data : array<string|int, mixed>
-
An array with fields like array( "fields" => array( "FIELD1" => "value1", "FIELD2" => "value2", ), "auth_context" => \Bitrix\Main\Authentication\Context object ) or just a plain array of fields.
Tags
Return values
UpdateResultupdateMulti()
public
static updateMulti(array<string|int, mixed> $primaries, array<string|int, mixed> $data[, bool $ignoreEvents = false ]) : UpdateResult
Parameters
- $primaries : array<string|int, mixed>
- $data : array<string|int, mixed>
- $ignoreEvents : bool = false
Tags
Return values
UpdateResultupsert()
Execute UPSERT operation.
public
static upsert(array<string|int, mixed> $data) : void
Parameters
- $data : array<string|int, mixed>
-
Field data.
wakeUpCollection()
public
static wakeUpCollection(mixed $rows) : EO_DealContact_Collection
Parameters
- $rows : mixed
Return values
EO_DealContact_CollectionwakeUpObject()
public
static wakeUpObject(mixed $row) : EO_DealContact
Parameters
- $row : mixed