TaskFieldHandler::prepareGroupId

  1. Bitrix24 API (v. 23.675.0)
  2. tasks
  3. TaskFieldHandler
  4. prepareGroupId
  • Модуль: tasks
  • Путь к файлу: ~/bitrix/modules/tasks/lib/control/handler/taskfieldhandler.php
  • Класс: BitrixTasksControlHandlerTaskFieldHandler
  • Вызов: TaskFieldHandler::prepareGroupId
public function prepareGroupId(): self
{
	if (
		!isset($this->fields['GROUP_ID'])
		&& !$this->taskId
	)
	{
		$this->fields['GROUP_ID'] = 0;
	}

	if (array_key_exists('GROUP_ID', $this->fields))
	{
		$this->fields['GROUP_ID'] = (int) $this->fields['GROUP_ID'];
	}

	if (
		$this->taskId
		&& isset($this->fields['GROUP_ID'])
		&& $this->fields['GROUP_ID']
		&& $this->fields['GROUP_ID'] !== (int) $this->taskData['GROUP_ID']
	)
	{
		$this->fields['STAGE_ID'] = 0;
	}

	return $this;
}

Добавить комментарий