PositionalArraySorter
final class PositionalArraySorter (View source)
Flexible array sorter that sorts an array according to a "position" metadata.
The expected format for the $subject is:
array(
array(
'foo' => 'bar'
'position' => '
The
Methods
__construct(array $subject, string $positionPropertyPath = 'position', bool $removeNullValues = true)
No description
array
toArray()
Returns a sorted copy of the subject array
array
getSortedKeys()
Returns the keys of $this->subject sorted according to the position meta data
Details
__construct(array $subject, string $positionPropertyPath = 'position', bool $removeNullValues = true)
No description
array
toArray()
Returns a sorted copy of the subject array
array
getSortedKeys()
Returns the keys of $this->subject sorted according to the position meta data
TODO Detect circles in after / before dependencies (#52185)