In the examples modules I see a simple example of tableSort with one table. Searching online I find a post where they claim Drupal 7 allowed a db_select() object to be created and then extended it with a join(), and then the final ->extend('TableSort');
I need to do an innerJoin() which appears to be a method of the SelectQuery class, and not necessarily a method of the Tablesort class. That's why the docs I see about extenders say it's critical to invoke the TableSort in the instantiation of the db_select object. Thus, my attempt:
$get_all_members = db_select('users', 'u')->innerJoin('members', 'm', 'u.uid = m.uid')->extend('TableSort');
Call to a member function extend() on string
is the response. Is there a way to convert a db_query into a TableSort object like it appears the extender is doing?
Or, could I find a way to combine the fields I need in these two tables to pass to the TableSort object?