• Модуль: bizproc
  • Путь к файлу: ~/bitrix/modules/bizproc/lib/copy/implement/trigger.php
  • Класс: BitrixBizprocCopyImplementTrigger
  • Вызов: Trigger::prepareFieldsToCopy
public function prepareFieldsToCopy(array $fields)
{
	if (isset($fields["ID"]))
	{
		unset($fields["ID"]);
	}

	if ($this->targetDocumentType)
	{
		$fields["MODULE_ID"] = $this->targetDocumentType[0];
		$fields["ENTITY"] = $this->targetDocumentType[1];
		$fields["DOCUMENT_TYPE"] = $this->targetDocumentType[2];
	}

	if (array_key_exists($fields["DOCUMENT_STATUS"], $this->mapStatusIdsCopiedDocument))
	{
		$fields["DOCUMENT_STATUS"] = $this->mapStatusIdsCopiedDocument[$fields["DOCUMENT_STATUS"]];
	}

	return $fields;
}