• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/kanban/sort/settings.php
  • Класс: Bitrix\Crm\Kanban\Sort\Settings
  • Вызов: Settings::__construct
public function __construct(array $supportedTypes, string $currentType)
{
	$this->supportedTypes = array_filter($supportedTypes, [Type::class, 'isDefined']);
	if (empty($this->supportedTypes))
	{
		throw new ArgumentException('No valid supported types provided');
	}

	if (!Type::isDefined($currentType))
	{
		throw new ArgumentOutOfRangeException('currentType', Type::getAll());
	}
	if (!in_array($currentType, $this->supportedTypes, true))
	{
		throw new ArgumentException('$currentType is not supported');
	}

	$this->currentType = $currentType;
}