ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ByTitle.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_title = $this->resource_builder->get($a)->getCurrentRevision()->getInformation()->getTitle();
37 $b_title = $this->resource_builder->get($b)->getCurrentRevision()->getInformation()->getTitle();
38 return strcmp($a_title, $b_title);
39 });
40 return $identifications;
41 }
42}
sortResourceIdentification(array $identifications)
Definition: ByTitle.php:33
$a
thx to https://mlocati.github.io/php-cs-fixer-configurator for the examples