• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/Service/Factory.php
  • Класс: Bitrix\Crm\Service\Factory
  • Вызов: Factory::getFieldsCollection
public function getFieldsCollection(): Field\Collection
{
	if ($this->fieldsCollection === null)
	{
		$fields = [];
		$userFields = $this->getUserFields();
		foreach ($this->getFieldsInfo() as $name => $info)
		{
			$fields[$name] = $this->createField($name, $info);
		}
		foreach ($this->getUserFieldsInfo() as $name => $info)
		{
			$info['USER_FIELD'] = $userFields[$name];
			$fields[$name] = $this->createField($name, $info);
		}

		$this->fieldsCollection = new Field\Collection($fields);
	}

	return $this->fieldsCollection;
}