private function getOrderedColumnsWithPrependedNumerals($defaultRow, $othersRowLabel)
{
$flags = ENT_COMPAT;
if (defined('ENT_HTML401')) {
$flags |= ENT_HTML401;
// part of default flags for 5.4, but not 5.3
}
// must use decoded character otherwise sort later will fail
// (sort column will be set to decoded but columns will have )
$nbsp = html_entity_decode(' ', $flags, 'utf-8');
$result = array();
$currentIndex = 1;
foreach ($defaultRow as $columnName => $ignore) {
if ($columnName === $othersRowLabel || $columnName === 'label') {
$result[] = $columnName;
} else {
$modifiedColumnName = $currentIndex . '.' . $nbsp . $columnName;
$result[] = $modifiedColumnName;
++$currentIndex;
}
}
return $result;
}