How to extend TableSort class
Like any other extender, the TableSort class implements the SelectQueryInterface interface.

Your code doesn't work because tablesort_get_query_parameters() is a Drupal function, not a method defined from SelectQueryInterface. To change the behavior of an extender, you need to re-define one of the methods listed in the documentation for SelectQueryInterface.

References


Extenders