• Модуль: tasks
  • Путь к файлу: ~/bitrix/modules/tasks/lib/item/converter.php
  • Класс: BitrixTasksItemConverter
  • Вызов: Converter::getConverterForSubEntity
protected function getConverterForSubEntity($name)
{
	if(!array_key_exists($name, $this->subConverterCache))
	{
		$map = $this->getSubEntityConverterClassMap();

		if(isset($map[$name]))
		{
			$cClass = trim((string) $map[$name]['class']);

			if($cClass == '')
			{
				throw new ArgumentTypeException('No converter class specified');
			}
			else
			{
				$converter = new $cClass();
				if(!Converter::isA($converter))
				{
					throw new ArgumentTypeException($cClass.' is not a converter');
				}

				$this->subConverterCache[$name] = $converter;
			}
		}
	}

	return ($this->subConverterCache[$name] ?? null);
}