19 declare(strict_types=1);
33 private \ILIAS\ResourceStorage\Services
$irss;
39 $this->irss = $DIC->resourceStorage();
44 return $this->view_request;
50 public function getEntries(): array
52 static $entries_at_current_level;
53 static $current_level;
55 if ($current_level !== $this->view_request->getPath()) {
56 unset($entries_at_current_level);
58 if (isset($entries_at_current_level)) {
59 return $entries_at_current_level;
62 $current_level = $this->view_request->getPath();
64 $entries_at_current_level = iterator_to_array(
65 $this->view_request->getWrapper()->getEntries(
72 $size_a = $a instanceof
Dir ? 0 : $a->getSize();
73 $size_b = $b instanceof
Dir ? 0 : $b->getSize();
74 $type_a = $a instanceof
Dir ?
'' : $a->getMimeType();
75 $type_b = $b instanceof
Dir ?
'' : $b->getMimeType();
76 switch ($this->view_request->getSortation()) {
82 return $size_a - $size_b;
84 return $size_b - $size_a;
90 return strcasecmp($type_a, $type_b);
92 return strcasecmp($type_b, $type_a);
98 return $entries_at_current_level;
103 return count($this->getEntries());
ILIAS ResourceStorage Services $irss
const BY_CREATION_DATE_ASC
const BY_CREATION_DATE_DESC
__construct(private Request $view_request,)
$a
thx to https://mlocati.github.io/php-cs-fixer-configurator for the examples