ILIAS  release_8 Revision v8.24
class.ilDclTextRecordQueryObject.php
Go to the documentation of this file.
1<?php
2
20{
21 public function applyCustomSorting(ilDclBaseFieldModel $field, array $all_records, $direction = 'asc'): array
22 {
23 $sort_array = array();
24 foreach ($all_records as $id) {
26 $sort_array[$id] = $url_field->getSortingValue();
27 }
28 switch (strtolower($direction)) {
29 case 'asc':
30 asort($sort_array);
31 break;
32 case 'desc':
33 arsort($sort_array);
34 break;
35 }
36
37 return array_keys($sort_array);
38 }
39}
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getRecordFieldCache(object $record, object $field)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
applyCustomSorting(ilDclBaseFieldModel $field, array $all_records, $direction='asc')