ILIAS
trunk Revision v11.0_alpha-2662-g519ff7d528f
◀ ilDoc Overview
ByTitle.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
namespace
ILIAS\ResourceStorage\Collection\Sorter
;
22
23
use
ILIAS\ResourceStorage\Identification\ResourceIdentification
;
24
31
class
ByTitle
extends
AbstractBaseSorter
implements
CollectionSorter
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
}
ILIAS\ResourceStorage\Collection\Sorter
Definition:
AbstractBaseSorter.php:21
ILIAS\Export\ImportHandler\Parser\NodeInfo\Collection::Sorter\ByTitle\sortResourceIdentification
sortResourceIdentification(array $identifications)
Definition:
ByTitle.php:33
ResourceIdentification
ILIAS\ResourceStorage\Identification\ResourceIdentification
Class ResourceIdentification.
Definition:
ResourceIdentification.php:30
ILIAS\Export\ImportHandler\Parser\NodeInfo\Collection::Sorter\AbstractBaseSorter
Class AbstractBaseSorter.
Definition:
AbstractBaseSorter.php:32
Vendor\Package\$b
$b
Definition:
example_cleaned.php:49
ILIAS\Export\ImportHandler\Parser\NodeInfo\Collection::Sorter\CollectionSorter
Interface CollectionSorter.
Definition:
CollectionSorter.php:31
ILIAS\Export\ImportHandler\Parser\NodeInfo\Collection::Sorter\ByTitle
Class ByTitle.
Definition:
ByTitle.php:31
Vendor\Package\$a
$a
thx to https://mlocati.github.io/php-cs-fixer-configurator for the examples
Definition:
example_cleaned.php:49
components
ILIAS
ResourceStorage
src
Collection
Sorter
ByTitle.php
Generated on Wed Sep 3 2025 23:03:42 for ILIAS by
1.8.13 (using
Doxyfile
)