• Модуль: tasks
  • Путь к файлу: ~/bitrix/modules/tasks/lib/item.php
  • Класс: BitrixTasksItem
  • Вызов: Item::setData
public function setData(array $data, array $parameters = array())
{
	if($this->isImmutable())
	{
		return $this; // todo: throw NotAllowedException?
	}

	foreach($data as $k => $v)
	{
		$this->offsetSetConfigurable($k, $v, $parameters);
	}

	// update id from data, if passed
	if(
		!$this->getId()
		&& isset($data['ID'])
		&& intval($data['ID'])
	)
	{
		$this->setId(intval($data['ID']));
	}

	return $this;
}