ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ByCreationDate.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
24
32{
33 protected function sortResourceIdentification(array $identifications): array
34 {
35 usort($identifications, function (ResourceIdentification $a, ResourceIdentification $b): int {
36 $a_creation_date = $this->resource_builder->get($a)->getCurrentRevision()->getInformation(
37 )->getCreationDate();
38 $b_creation_date = $this->resource_builder->get($b)->getCurrentRevision()->getInformation(
39 )->getCreationDate();
40 return $a_creation_date->diff($b_creation_date)->invert;
41 });
42 return $identifications;
43 }
44}
$a
thx to https://mlocati.github.io/php-cs-fixer-configurator for the examples