ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
class.ilDclFormulaRecordQueryObject.php
Go to the documentation of this file.
1 <?php
2 
10 
11  public function applyCustomSorting(ilDclBaseFieldModel $field, array $all_records_ids, $direction = 'asc') {
12  $sort_array = array();
13  foreach ($all_records_ids as $id) {
14  $formula_field = ilDclCache::getRecordFieldCache(new ilDclBaseRecordModel($id), $field);
15  $sort_array[$id] = $formula_field->getValue();
16  }
17  switch (strtolower($direction)) {
18  case 'asc':
19  asort($sort_array);
20  break;
21  case 'desc':
22  arsort($sort_array);
23  break;
24  }
25  return array_keys($sort_array);
26  }
27 }
Class ilDclBaseFieldModel.
applyCustomSorting(ilDclBaseFieldModel $field, array $all_records_ids, $direction='asc')
Class ilDclRecordQueryObject.
Create styles array
The data for the language used.
static getRecordFieldCache($record, $field)
Class ilDclBaseRecordModel.
Class ilDclFormulaRecordQueryObject.