ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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  {
13  $sort_array = array();
14  foreach ($all_records_ids as $id) {
15  $formula_field = ilDclCache::getRecordFieldCache(new ilDclBaseRecordModel($id), $field);
16  $sort_array[$id] = $formula_field->getValue();
17  }
18  switch (strtolower($direction)) {
19  case 'asc':
20  asort($sort_array);
21  break;
22  case 'desc':
23  arsort($sort_array);
24  break;
25  }
26  return array_keys($sort_array);
27  }
28 }
Class ilDclBaseFieldModel.
applyCustomSorting(ilDclBaseFieldModel $field, array $all_records_ids, $direction='asc')
Class ilDclRecordQueryObject.
if(!array_key_exists('StateId', $_REQUEST)) $id
Create styles array
The data for the language used.
static getRecordFieldCache($record, $field)
Class ilDclBaseRecordModel.
Class ilDclFormulaRecordQueryObject.