Merx

$pricingRules->sort()

Sorts the elements by any number of fields

$pricingRules->sort(...$args): Kirby\Toolkit\Collection

Parameters

Name Type Default
...$args mixed -

Return type

Kirby\Toolkit\Collection

Description

$collection->sort('fieldName');
$collection->sort('fieldName', 'desc');
$collection->sort('fieldName', 'asc', SORT_REGULAR);
$collection->sort(fn ($a) => ...);

Parent class

Wagnerwagner\Merx\PricingRules inherited from Kirby\Toolkit\Collection