public function move_category(category_controller $category, int $beforeid = 0) {
        $category = $this->validate_category($category);
        api::move_category($category, $beforeid);
        $this->clear_configuration_cache();
    }
public function move_category(category_controller $category, int $beforeid = 0) {
        $category = $this->validate_category($category);
        api::move_category($category, $beforeid);
        $this->clear_configuration_cache();
    }
public function move_category ( category_controller $ category , int $ beforeid = 0 ) { $ category = $ this -> validate_category ( $ category ) ; api :: move_category ( $ category , $ beforeid ) ; $ this -> clear_configuration_cache ( ) ; }
Change sort order of the categories

@param category_controller $category category that needs to be moved
@param int $beforeid id of the category this category needs to be moved before, 0 to move to the end
Change sort order of the categories