public function sortElements()
    {
        $sort = function ($a, $b) {
            /**
             * @var Column\ColumnInterface|Filter\FilterInterface $a
             * @var Column\ColumnInterface|Filter\FilterInterface $b
             */
            $aPos = $a->getConfig()->getPosition();
            $bPos = $b->getConfig()->getPosition();

            if ($aPos == $bPos) {
                return 0;
            }

            return $aPos > $bPos ? 1 : -1;
        };

        uasort($this->columns, $sort);
        uasort($this->filters, $sort);
        // TODO actions
    }
public function sortElements()
    {
        $sort = function ($a, $b) {
            /**
             * @var Column\ColumnInterface|Filter\FilterInterface $a
             * @var Column\ColumnInterface|Filter\FilterInterface $b
             */
            $aPos = $a->getConfig()->getPosition();
            $bPos = $b->getConfig()->getPosition();

            if ($aPos == $bPos) {
                return 0;
            }

            return $aPos > $bPos ? 1 : -1;
        };

        uasort($this->columns, $sort);
        uasort($this->filters, $sort);
        // TODO actions
    }
public function sortElements ( ) { $ sort = function ( $ a , $ b ) { /**
             * @var Column\ColumnInterface|Filter\FilterInterface $a
             * @var Column\ColumnInterface|Filter\FilterInterface $b
             */ $ aPos = $ a -> getConfig ( ) -> getPosition ( ) ; $ bPos = $ b -> getConfig ( ) -> getPosition ( ) ; if ( $ aPos == $ bPos ) { return 0 ; } return $ aPos > $ bPos ? 1 : - 1 ; } ; uasort ( $ this -> columns , $ sort ) ; uasort ( $ this -> filters , $ sort ) ; // TODO actions }
Sorts the columns and filers.
Sorts the columns and filers .