• Модуль: tasks
  • Путь к файлу: ~/bitrix/modules/tasks/lib/item/task/collection/member.php
  • Класс: BitrixTasksItemTaskCollectionMember
  • Вызов: Member::updateValuePart
public function updateValuePart($valuePart, $valueType, $item)
{
	$itemClass = static::getItemClass();

	$this->delete(array('=TYPE' => $valueType)); // remove all the previous of this type

	if(Type::isIterable($valuePart))
	{
		foreach($valuePart as $k => $v)
		{
			if($v === null) // there were a null-ed field
			{
				continue;
			}

			/** @var SubItem $subItem */
			$subItem = new $itemClass(array(
				'TASK_ID' => $item->getId(),
				'USER_ID' => $v,
				'TYPE' => $valueType,
			), $item->getUserId());
			$subItem->setParent($item);

			$this->push($subItem);
		}
	}
}