Get('ext_key_to_remote'); } public function GetEditClass() { return "LinkedSet"; } public function DuplicatesAllowed() { return $this->GetOptional("duplicates", false); } // The same object may be linked several times... or not... public function GetTrackingLevel() { return $this->GetOptional( 'tracking_level', MetaModel::GetConfig()->Get('tracking_level_linked_set_indirect_default') ); } /** * Find the corresponding "link" attribute on the target class, if any * * @return null | AttributeDefinition * @throws CoreException */ public function GetMirrorLinkAttribute() { $oRet = null; /** @var \AttributeExternalKey $oExtKeyToRemote */ $oExtKeyToRemote = MetaModel::GetAttributeDef($this->GetLinkedClass(), $this->GetExtKeyToRemote()); $sRemoteClass = $oExtKeyToRemote->GetTargetClass(); foreach (MetaModel::ListAttributeDefs($sRemoteClass) as $sRemoteAttCode => $oRemoteAttDef) { if (!$oRemoteAttDef instanceof AttributeLinkedSetIndirect) { continue; } if ($oRemoteAttDef->GetLinkedClass() != $this->GetLinkedClass()) { continue; } if ($oRemoteAttDef->GetExtKeyToMe() != $this->GetExtKeyToRemote()) { continue; } if ($oRemoteAttDef->GetExtKeyToRemote() != $this->GetExtKeyToMe()) { continue; } $oRet = $oRemoteAttDef; break; } return $oRet; } /** @inheritDoc */ public static function IsBulkModifyCompatible(): bool { return true; } }