src/Repository.php
public function getOrdered($direction = 'asc')
    {
        $components = $this->enabled();

        uasort($components, function(Component $a, Component $b) use ($direction) {
            if ($a->order == $b->order) {
                return 0;
            }

            if ($direction == 'desc') {
                return $a->order < $b->order ? 1 : -1;
            }

            return $a->order > $b->order ? 1 : -1;
        });

        return $components;
    }
public function getOrdered($direction = 'asc')
    {
        $components = $this->enabled();

        uasort($components, function(Component $a, Component $b) use ($direction) {
            if ($a->order == $b->order) {
                return 0;
            }

            if ($direction == 'desc') {
                return $a->order < $b->order ? 1 : -1;
            }

            return $a->order > $b->order ? 1 : -1;
        });

        return $components;
    }
public function getOrdered ( $ direction = 'asc' ) { $ components = $ this -> enabled ( ) ; uasort ( $ components , function ( Component $ a , Component $ b ) use ( $ direction ) { if ( $ a -> order == $ b -> order ) { return 0 ; } if ( $ direction == 'desc' ) { return $ a -> order < $ b -> order ? 1 : - 1 ; } return $ a -> order > $ b -> order ? 1 : - 1 ; } ) ; return $ components ; }
Get all ordered components.

@param string $direction

@return array
Get all ordered components .