OptimizeColumnLoad([ $sTargetClass => $aFieldsToLoad, ]); // Iterate throw objects... $oDbObjectSet->Rewind(); while ($oObject = $oDbObjectSet->Fetch()) { // Ignore obsolete data if (!utils::ShowObsoleteData() && $oObject->IsObsolete()) { continue; } // Prepare objet data $aObjectData = []; // Link keys $aObjectData['link_keys'] = [$oObject->GetKey()]; // In case ot indirect link if ($sTargetField != null) { $oObject = MetaModel::GetObject($sTargetClass, $oObject->Get($sTargetField)); } // Remote key $aObjectData['key'] = $oObject->GetKey(); // force option $aObjectData['force'] = $bForce; // Fill loaded columns... foreach ($aFieldsToLoad as $sField) { $aObjectData[$sField] = $oObject->Get($sField); } // Compute others data $aInitialOptions[$oObject->GetKey()] = ObjectRepository::ComputeOthersData($oObject, $sTargetClass, $aObjectData, $aComplementAttributeSpec, $sObjectImageAttCode); } return $aInitialOptions; } catch (Exception $e) { ExceptionLog::LogException($e); return null; } } }