UiFormConfiguration::getListIndex

  1. Bitrix24 API (v. 23.675.0)
  2. catalog
  3. UiFormConfiguration
  4. getListIndex
  • Модуль: catalog
  • Путь к файлу: ~/bitrix/modules/catalog/lib/update/uiformconfiguration.php
  • Класс: BitrixCatalogUpdateUiFormConfiguration
  • Вызов: UiFormConfiguration::getListIndex
static function getListIndex(array $formSettings, string $listName): ?array
{
	if (
		empty($formSettings)
		|| $listName === ''
	)
	{
		return null;
	}

	foreach ($formSettings as $columnIndex => $column)
	{
		if (!static::isValidColumnConfig($column))
		{
			continue;
		}

		foreach ($column['elements'] as $listIndex => $list)
		{
			if (!static::isValidElementListConfig($list))
			{
				continue;
			}
			if ($list['type'] !== 'section')
			{
				continue;
			}
			if ($list['name'] === $listName)
			{
				return [
					'COLUMN' => $columnIndex,
					'LIST' => $listIndex,
					'ROW' => 0,
				];
			}
		}
	}

	return null;
}

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