• Модуль: sale
  • Путь к файлу: ~/bitrix/modules/sale/lib/entityproperty.php
  • Класс: BitrixSaleEntityProperty
  • Вызов: EntityProperty::getMeaningfulValues
static function getMeaningfulValues($personTypeId, $request)
{
	$result = [];

	$personTypeId = intval($personTypeId);
	if ($personTypeId <= 0 || !is_array($request))
	{
		return [];
	}

	$dbRes = static::getList([
		'select' => [
			'ID',
			'IS_LOCATION',
			'IS_EMAIL',
			'IS_PROFILE_NAME',
			'IS_PAYER',
			'IS_LOCATION4TAX',
			'IS_ZIP',
			'IS_PHONE',
			'IS_ADDRESS',
			'IS_ADDRESS_FROM',
			'IS_ADDRESS_TO',
		],
		'filter' => [
			'=ACTIVE' => 'Y',
			'=UTIL' => 'N',
			'=PERSON_TYPE_ID' => $personTypeId
		]
	]);

	while ($row = $dbRes->fetch())
	{
		if (array_key_exists($row["ID"], $request))
		{
			foreach ($row as $key => $value)
			{
				if (($value === "Y") && (mb_substr($key, 0, 3) === "IS_"))
				{
					$result[mb_substr($key, 3)] = $request[$row["ID"]];
				}
			}
		}
	}

	return $result;
}