• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/webform/requisite.php
  • Класс: Bitrix\Crm\WebForm\Requisite
  • Вызов: Requisite::getBankingFields
public function getBankingFields(int $countryId): array
{
	$banking = array_intersect_key(
		EntityBankDetail::getSingleInstance()->getFormFieldsInfo($countryId),
		array_flip(EntityBankDetail::getSingleInstance()->getRqFieldByCountry()[$countryId] ?? [])
	);
	$banking = array_filter(
		$banking,
		function (array $field)
		{
			return $field['isRQ'];
		}
	);

	return array_map(
		function (array $field, string $name)
		{
			return [
				'name' => $name,
				'type' => $field['type'] ?? '', //$field['formType'] for datetime is text
				'label' => $field['title'] ?? '',
				'multiple' => $field['multiple'] ?? false,
				'required' => $field['required'] ?? false,
			];
		},
		$banking,
		array_keys($banking)
	);
}