CrmQuoteField::getListUfFieldsForCheck

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. CrmQuoteField
  4. getListUfFieldsForCheck
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/update/userfield/crmquotefield.php
  • Класс: Bitrix\Crm\Update\UserField\CrmQuoteField
  • Вызов: CrmQuoteField::getListUfFieldsForCheck
protected function getListUfFieldsForCheck($entityId)
{
	$queryObject = \CUserTypeEntity::getList(array(), array("ENTITY_ID" => $entityId, "USER_TYPE_ID" => "crm"));
	$listUfFieldsForCheck = array();
	while($listUfFields = $queryObject->fetch())
	{
		if(is_array($listUfFields["SETTINGS"]))
		{
			$tmpArray = array_filter($listUfFields["SETTINGS"], function($mark){
				return $mark == "Y";
			});
			if(count($tmpArray) == 1)
			{
				$listUfFieldsForCheck[$listUfFields["ID"]]= array(
					"ENTITY_ID" => $listUfFields["ENTITY_ID"],
					"FIELD_NAME" => $listUfFields["FIELD_NAME"],
					"AVAILABLE_ENTITY_TYPE" => array_search("Y", $tmpArray)
				);
			}
		}
	}

	return $listUfFieldsForCheck;
}

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