StagesTable extends DataManager
Class StagesTable
DO NOT WRITE ANYTHING BELOW THIS
<<< ORMENTITYANNOTATION
Table of Contents
Constants
- DEF_COLOR_STAGE = '47D1E2'
- Default colors.
- 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"
- MY_PLAN_VERSION = '6'
- SYS_TYPE_DEFAULT = 'NEW'
- SYS_TYPE_FINISH = 'FINISH'
- SYS_TYPE_FINISH_COLOR = '75D900'
- SYS_TYPE_NEW = 'NEW'
- System type of stages (new, in progress, etc.).
- SYS_TYPE_NEW_COLOR = '00C4FB'
- SYS_TYPE_PROGRESS = 'WORK'
- SYS_TYPE_PROGRESS_COLOR = self::DEF_COLOR_STAGE
- SYS_TYPE_REVIEW = 'REVIEW'
- WORK_MODE_ACTIVE_SPRINT = 'A'
- WORK_MODE_GROUP = 'G'
- Allowed work modes.
- WORK_MODE_TIMELINE = 'P'
- WORK_MODE_USER = 'U'
Methods
- add() : AddResult
- Adds row to entity table
- addMulti() : AddResult
- checkFields() : mixed
- Checks the data fields before saving to DB. Result stores in the $result object
- checkWorkMode() : bool
- cleanCache() : void
- Cleans the tablet cache after data modifications.
- copyView() : array<string|int, mixed>|bool
- Copy view from one entity to another.
- createCollection() : StagesCollection
- createObject() : Stage
- cryptoEnabled() : bool
- Returns true if crypto is enabled for a field.
- delete() : DeleteResult
- Base delete-method, first check that column is not system.
- disableLinkForUser() : void
- Disable link in stage for user.
- disablePinForUser() : void
- Disable pin in stage for user.
- enableCrypto() : mixed
- Sets a flag indicating crypto support for a field.
- getActiveSprintStages() : array<string|int, mixed>
- getById() : EO_Stages_Result
- Returns selection by entity's primary key
- getByPrimary() : EO_Stages_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
- getCount() : int
- Performs COUNT query on entity and returns the result.
- getDefaultStageId() : int
- Get default stage id.
- getEntity() : EO_Stages_Entity
- Returns entity object
- getEntityClass() : Entity|string
- getGroupStageById() : array<string|int, mixed>|null
- getGroupStages() : array<string|int, mixed>
- getList() : EO_Stages_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>
- Returns entity map definition.
- 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
- getStageIdByCode() : int|array<string|int, mixed>
- Get stages id by stage code.
- getStages() : array<string|int, mixed>
- Get stages and create default.
- getStagesCount() : array<string|int, mixed>
- getSystemStage() : Stage|null
- getTableName() : string
- Returns DB table name for entity
- getTitle() : string|null
- getUfId() : mixed
- getWorkMode() : string
- 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() : void
- onSocNetGroupDelete() : void
- Delete all stages and sprints of group after group delete.
- onUpdate() : mixed
- onUserDelete() : void
- Delete all stages of user after user delete.
- pinInStage() : void
- Pin the task in the DEFAULT stage for users/group.
- pinInTheStage() : void
- Pin the task in the stage for user/group.
- postInitialize() : null
- query() : EO_Stages_Query
- Creates and returns the Query object for the entity
- setCurrentDeletingObject() : void
- setDefaultScope() : Query
- setWorkMode() : void
- systemDelete() : DeleteResult
- unsetEntity() : mixed
- update() : UpdateResult
- Updates row in entity table by primary key
- updateByCode() : Result|null
- Add or update stages by code/id.
- updateMulti() : UpdateResult
- wakeUpCollection() : StagesCollection
- wakeUpObject() : Stage
Constants
DEF_COLOR_STAGE
Default colors.
public
mixed
DEF_COLOR_STAGE
= '47D1E2'
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"
MY_PLAN_VERSION
public
mixed
MY_PLAN_VERSION
= '6'
SYS_TYPE_DEFAULT
public
mixed
SYS_TYPE_DEFAULT
= 'NEW'
SYS_TYPE_FINISH
public
mixed
SYS_TYPE_FINISH
= 'FINISH'
SYS_TYPE_FINISH_COLOR
public
mixed
SYS_TYPE_FINISH_COLOR
= '75D900'
SYS_TYPE_NEW
System type of stages (new, in progress, etc.).
public
mixed
SYS_TYPE_NEW
= 'NEW'
Separated from other stages - timeline's stages, sprint's stages.
Tags
SYS_TYPE_NEW_COLOR
public
mixed
SYS_TYPE_NEW_COLOR
= '00C4FB'
SYS_TYPE_PROGRESS
public
mixed
SYS_TYPE_PROGRESS
= 'WORK'
SYS_TYPE_PROGRESS_COLOR
public
mixed
SYS_TYPE_PROGRESS_COLOR
= self::DEF_COLOR_STAGE
SYS_TYPE_REVIEW
public
mixed
SYS_TYPE_REVIEW
= 'REVIEW'
WORK_MODE_ACTIVE_SPRINT
public
mixed
WORK_MODE_ACTIVE_SPRINT
= 'A'
WORK_MODE_GROUP
Allowed work modes.
public
mixed
WORK_MODE_GROUP
= 'G'
WORK_MODE_TIMELINE
public
mixed
WORK_MODE_TIMELINE
= 'P'
WORK_MODE_USER
public
mixed
WORK_MODE_USER
= 'U'
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.
Tags
Return values
AddResult —Contains ID of inserted row
addMulti()
public
static addMulti(mixed $rows[, bool $ignoreEvents = false ]) : AddResult
Parameters
- $rows : mixed
- $ignoreEvents : bool = false
Tags
Return values
AddResultcheckFields()
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
checkWorkMode()
public
static checkWorkMode(string $mode) : bool
Parameters
- $mode : string
Return values
boolcleanCache()
Cleans the tablet cache after data modifications.
public
static cleanCache() : void
copyView()
Copy view from one entity to another.
public
static copyView(int $fromEntityId, int $toEntityId[, string $entityType = self::WORK_MODE_GROUP ]) : array<string|int, mixed>|bool
Parameters
- $fromEntityId : int
- $toEntityId : int
- $entityType : string = self::WORK_MODE_GROUP
Tags
Return values
array<string|int, mixed>|boolcreateCollection()
public
static createCollection() : StagesCollection
Return values
StagesCollectioncreateObject()
public
static createObject([mixed $setDefaultValues = = 'true' ]) : Stage
Parameters
- $setDefaultValues : mixed = = 'true'
Return values
StagecryptoEnabled()
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()
Base delete-method, first check that column is not system.
public
static delete(mixed $primary[, int $entityId = 0 ]) : DeleteResult
Parameters
- $primary : mixed
- $entityId : int = 0
Tags
Return values
DeleteResultdisableLinkForUser()
Disable link in stage for user.
public
static disableLinkForUser(array<string|int, mixed>|int $userIds) : void
Parameters
- $userIds : array<string|int, mixed>|int
disablePinForUser()
Disable pin in stage for user.
public
static disablePinForUser(array<string|int, mixed>|int $userIds) : void
Parameters
- $userIds : array<string|int, mixed>|int
enableCrypto()
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
getActiveSprintStages()
public
static getActiveSprintStages(int $sprintId[, bool $disableCreate = false ]) : array<string|int, mixed>
Parameters
- $sprintId : int
- $disableCreate : bool = false
Tags
Return values
array<string|int, mixed>getById()
Returns selection by entity's primary key
public
static getById(mixed $id) : EO_Stages_Result
Parameters
- $id : mixed
-
Primary key of the entity
Return values
EO_Stages_ResultgetByPrimary()
Returns selection by entity's primary key and optional parameters for getList()
public
static getByPrimary(mixed $primary[, array<string|int, mixed> $parameters = = '[]' ]) : EO_Stages_Result
Parameters
- $primary : mixed
-
Primary key of the entity
- $parameters : array<string|int, mixed> = = '[]'
-
Additional parameters for getList()
Return values
EO_Stages_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
stringgetCount()
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
intgetDefaultStageId()
Get default stage id.
public
static getDefaultStageId([mixed $id = 0 ]) : int
Parameters
- $id : mixed = 0
Tags
Return values
intgetEntity()
Returns entity object
public
static getEntity() : EO_Stages_Entity
Return values
EO_Stages_EntitygetEntityClass()
public
static getEntityClass() : Entity|string
Return values
Entity|stringgetGroupStageById()
public
static getGroupStageById(int $stageId, int $groupId) : array<string|int, mixed>|null
Parameters
- $stageId : int
- $groupId : int
Tags
Return values
array<string|int, mixed>|nullgetGroupStages()
public
static getGroupStages(int $groupId[, bool $disableCreate = false ]) : array<string|int, mixed>
Parameters
- $groupId : int
- $disableCreate : bool = false
Tags
Return values
array<string|int, mixed>getList()
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_Stages_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_Stages_ResultgetMap()
Returns entity map definition.
public
static getMap() : array<string|int, mixed>
To get initialized fields @see \Bitrix\Main\ORM\Entity::getFields() and \Bitrix\Main\ORM\Entity::getField()
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>|null
Parameters
- $id : mixed
-
Primary key of the entity
Tags
Return values
array<string|int, mixed>|nullgetStageIdByCode()
Get stages id by stage code.
public
static getStageIdByCode(int $id[, int $entityId = 0 ]) : int|array<string|int, mixed>
Parameters
- $id : int
- $entityId : int = 0
Tags
Return values
int|array<string|int, mixed>getStages()
Get stages and create default.
public
static getStages([int|string $entityId = 0 ][, bool $disableCreate = false ]) : array<string|int, mixed>
Parameters
- $entityId : int|string = 0
- $disableCreate : bool = false
Tags
Return values
array<string|int, mixed>getStagesCount()
public
static getStagesCount(array<string|int, mixed> $stageList[, array<string|int, mixed> $filter = [] ][, mixed $userId = false ]) : array<string|int, mixed>
Parameters
- $stageList : array<string|int, mixed>
- $filter : array<string|int, mixed> = []
- $userId : mixed = false
Tags
Return values
array<string|int, mixed>getSystemStage()
public
static getSystemStage(int $groupId[, bool $force = false ]) : Stage|null
Parameters
- $groupId : int
- $force : bool = false
Tags
Return values
Stage|nullgetTableName()
Returns DB table name for entity
public
static getTableName() : string
Return values
stringgetTitle()
public
static getTitle() : string|null
Return values
string|nullgetUfId()
public
static getUfId() : mixed
getWorkMode()
public
static getWorkMode() : string
Return values
stringisCacheable()
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) : void
Parameters
- $event : Event
onSocNetGroupDelete()
Delete all stages and sprints of group after group delete.
public
static onSocNetGroupDelete(int $groupId) : void
Parameters
- $groupId : int
Tags
onUpdate()
public
static onUpdate(Event $event) : mixed
Parameters
- $event : Event
onUserDelete()
Delete all stages of user after user delete.
public
static onUserDelete(int $userId) : void
Parameters
- $userId : int
Tags
pinInStage()
Pin the task in the DEFAULT stage for users/group.
public
static pinInStage(int $taskId[, int|array<string|int, mixed> $users = [] ][, bool $refreshGroup = false ]) : void
Parameters
- $taskId : int
- $users : int|array<string|int, mixed> = []
- $refreshGroup : bool = false
Tags
pinInTheStage()
Pin the task in the stage for user/group.
public
static pinInTheStage(int $taskId, int $stageId) : void
Parameters
- $taskId : int
- $stageId : int
Tags
postInitialize()
public
static postInitialize(Entity $entity) : null
Parameters
- $entity : Entity
Return values
nullquery()
Creates and returns the Query object for the entity
public
static query() : EO_Stages_Query
Return values
EO_Stages_QuerysetCurrentDeletingObject()
public
static setCurrentDeletingObject(EntityObject $object) : void
Parameters
- $object : EntityObject
setDefaultScope()
public
static setDefaultScope(Query $query) : Query
Parameters
- $query : Query
Return values
QuerysetWorkMode()
public
static setWorkMode(string $mode) : void
Parameters
- $mode : string
systemDelete()
public
static systemDelete(int $id) : DeleteResult
Parameters
- $id : int
Tags
Return values
DeleteResultunsetEntity()
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
UpdateResultupdateByCode()
Add or update stages by code/id.
public
static updateByCode(mixed $id, mixed $fields) : Result|null
Parameters
- $id : mixed
- $fields : mixed
Tags
Return values
Result|nullupdateMulti()
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
UpdateResultwakeUpCollection()
public
static wakeUpCollection(mixed $rows) : StagesCollection
Parameters
- $rows : mixed
Return values
StagesCollectionwakeUpObject()
public
static wakeUpObject(mixed $row) : Stage
Parameters
- $row : mixed