CCrmRestEventDispatcher::onUserFieldAdd

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. CCrmRestEventDispatcher
  4. onUserFieldAdd
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/classes/general/restservice.php
  • Класс: \CCrmRestEventDispatcher
  • Вызов: CCrmRestEventDispatcher::onUserFieldAdd
static function onUserFieldAdd($fields)
{
	if (is_array($fields) && isset($fields['ID']) && $fields['ID'] > 0
		&& isset($fields['FIELD_NAME']) && is_string($fields['FIELD_NAME']) && $fields['FIELD_NAME'] <> ''
		&& isset($fields['ENTITY_ID']) && static::verifyEntityId($fields['ENTITY_ID']))
	{
		$id = (int)$fields['ID'];
		$entityId = $fields['ENTITY_ID'];
		$fieldName = $fields['FIELD_NAME'];

		self::sendEvent(
			'Add',
			array('id' => $id, 'entityId' => $entityId, 'fieldName' => $fieldName),
			array('UF_ENTITY_ID' => $entityId)
		);
	}
}

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