Elgg\Menu\UnpreparedMenu::setSortBy PHP Method

setSortBy() public method

Set how this menu should be sorted
See also: ElggMenuBuilder::sort
public setSortBy ( string | callable $sort_by = 'text' ) : void
$sort_by string | callable Sort strategy "text", "name", "priority", or callback
return void
    public function setSortBy($sort_by = 'text')
    {
        $this->params['sort_by'] = $sort_by;
    }