• Модуль: tasks
  • Путь к файлу: ~/bitrix/modules/tasks/lib/comments/viewed/group.php
  • Класс: BitrixTasksCommentsViewedGroup
  • Вызов: Group::prepare
protected function prepare(array $fields): array
{
	$role = $fields['role'];
	$groupId = $fields['groupId'];

	$withGroupId = (bool)$groupId;

	$withRole = false;
	if (is_null($role) === false)
	{
		$type = Group::resolveMemberTypeByRole($role);
		$withRole = is_null($type) === false;
	}

	return [
		$withGroupId,
		$withRole
	];
}