should::extendData

  1. Bitrix24 API (v. 23.675.0)
  2. tasks
  3. should
  4. extendData
  • Модуль: tasks
  • Путь к файлу: ~/bitrix/modules/tasks/lib/manager/task.php
  • Класс: Bitrix\Tasks\Manager\should
  • Вызов: should::extendData
static function extendData(&$data, array $references = array(), int $userId = 0)
{
	if (!$userId)
	{
		$userId = (int) \Bitrix\Tasks\Util\User::getId();
	}

	$user = UserModel::createFromId($userId);
	$data = self::cleanData($user, $data);

	if (is_array($references[ 'USER' ]))
	{
		Originator::extendData($data, $references[ 'USER' ]);
		Responsible::extendData($data, $references[ 'USER' ]);
		Auditor::extendData($data, $references[ 'USER' ]);
		Accomplice::extendData($data, $references[ 'USER' ]);
	}
	if (is_array($references[ 'RELATED_TASK' ]))
	{
		RelatedTask::extendData($data, $references[ 'RELATED_TASK' ]);
		ParentTask::extendData($data, $references[ 'RELATED_TASK' ]);
		ProjectDependence::extendData($data, $references[ 'RELATED_TASK' ]);
	}
	if (is_array($references[ 'GROUP' ]))
	{
		Project::extendData($data, $references[ 'GROUP' ]);
	}
}

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