RelationManager::ormCollectionToRelationCollection

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. RelationManager
  4. ormCollectionToRelationCollection
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/Relation/RelationManager.php
  • Класс: Bitrix\Crm\Relation\RelationManager
  • Вызов: RelationManager::ormCollectionToRelationCollection
protected function ormCollectionToRelationCollection(
	EO_EntityConversionMap_Collection $collection
): Relation\Collection
{
	$relations = new Relation\Collection();
	foreach ($collection as $entityObject)
	{
		$relation = new Relation(
			new RelationIdentifier(
				$entityObject->getSrcTypeId(),
				$entityObject->getDstTypeId()
			),
			Settings::createByEntityRelationObject($entityObject)
		);
		$relation->setStorageStrategy(new StorageStrategy\EntityRelationTable());

		$relations->add($relation);
	}

	return $relations;
}

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