33 $this->
lng = ($lng !=
null)
37 $this->
lng->loadLanguageModule(
"wfld");
45 $sort_options = ($wsp_type ==
"wfld")
48 if (in_array($wsp_type, [
"wfld",
"wsrt"])) {
55 if (isset($sort_options[self::SORT_DERIVED])) {
59 if (isset($sort_options[$selected])) {
60 $sort_options[$selected] =
"<strong>" . $sort_options[$selected] .
"</strong>";
65 protected function getLabel(
int $option): string
68 case self::SORT_DERIVED:
return $this->
lng->txt(
"wfld_derive");
69 case self::SORT_ALPHABETICAL_ASC:
return $this->
lng->txt(
"wfld_alphabetically_asc");
70 case self::SORT_ALPHABETICAL_DESC:
return $this->
lng->txt(
"wfld_alphabetically_desc");
71 case self::SORT_CREATION_ASC:
return $this->
lng->txt(
"wfld_creation_asc");
72 case self::SORT_CREATION_DESC:
return $this->
lng->txt(
"wfld_creation_desc");
77 public function sortNodes(array $nodes,
int $sorting): array
80 case self::SORT_ALPHABETICAL_ASC:
83 case self::SORT_ALPHABETICAL_DESC:
86 case self::SORT_CREATION_ASC:
89 case self::SORT_CREATION_DESC:
static sortArray(array $array, string $a_array_sortby_key, string $a_array_sortorder="asc", bool $a_numeric=false, bool $a_keep_keys=false)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getOptionsByType(string $wsp_type, int $selected, int $parent_effective)
const SORT_ALPHABETICAL_DESC
__construct(?ilLanguage $lng=null)
sortNodes(array $nodes, int $sorting)
const SORT_ALPHABETICAL_ASC