• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/lib/orm/fields/relations/relation.php
  • Класс: BitrixMainORMFieldsRelationsRelation
  • Вызов: Relation::getRefEntity
public function getRefEntity()
{
	if ($this->refEntity === null)
	{
		// refEntityName could be an object or a data class
		if (class_exists($this->refEntityName) && is_subclass_of($this->refEntityName, EntityObject::class))
		{
			/** @var EntityObject $refObjectClass */
			$refObjectClass = $this->refEntityName;
			$this->refEntityName = $refObjectClass::$dataClass;
		}

		$this->refEntity = Entity::getInstance($this->refEntityName);
	}

	return $this->refEntity;
}