public function sortPages($pages)
    {
        usort($pages['_items'], function ($a, $b) {
            //need to convert them to lowercase strings for equal comparison
            return strcmp(strtolower($a["name"]), strtolower($b["name"]));
        });

        return $pages;
    }
public function sortPages($pages)
    {
        usort($pages['_items'], function ($a, $b) {
            //need to convert them to lowercase strings for equal comparison
            return strcmp(strtolower($a["name"]), strtolower($b["name"]));
        });

        return $pages;
    }
public function sortPages ( $ pages ) { usort ( $ pages [ '_items' ] , function ( $ a , $ b ) { //need to convert them to lowercase strings for equal comparison return strcmp ( strtolower ( $ a [ "name" ] ) , strtolower ( $ b [ "name" ] ) ) ; } ) ; return $ pages ; }
sort pages in alphabetical user

@param mixed $pages

@return mixed
sort pages in alphabetical user