diff --git a/core/ormlinkset.class.inc.php b/core/ormlinkset.class.inc.php index 56573dc517..e116dd88ac 100644 --- a/core/ormlinkset.class.inc.php +++ b/core/ormlinkset.class.inc.php @@ -789,6 +789,30 @@ public function GetValues() return $aValues; } + /** + * List the objects by name + * @return array of linked object friendly-names + * @throws \CoreException + */ + public function GetLabels() + { + /** @var \AttributeLinkedSet|\AttributeLinkedSetIndirect $oAttDef */ + $oAttDef = MetaModel::GetAttributeDef($this->sHostClass, $this->sAttCode); + $sNameField = ($oAttDef->IsIndirect() ? $oAttDef->GetExtKeyToRemote().'_' : '').'friendlyname'; + + $aLabels = array(); + foreach ($this->aPreserved as $oLink) { + $aLabels[] = $oLink->Get($sNameField); + } + foreach ($this->aAdded as $oLink) { + $aLabels[] = $oLink->Get($sNameField); + } + + sort($aLabels); + + return $aLabels; + } + /** * @return \DBObjectSet|null */ diff --git a/core/spreadsheetbulkexport.class.inc.php b/core/spreadsheetbulkexport.class.inc.php index 2006729ba0..65f190b5dd 100644 --- a/core/spreadsheetbulkexport.class.inc.php +++ b/core/spreadsheetbulkexport.class.inc.php @@ -308,6 +308,15 @@ public function GetNextChunk(&$aStatus) } elseif ($oAttDef instanceof AttributeTagSet) { $sField = utils::HtmlEntities($oObj->GetAsCSV($sAttCode, $this->bLocalizeOutput, '')); $sData .= "