Get real field and table alias in a filter handler
I am developing a module to expose a filter which search for selectect text inside selected fields of a view. I managed to code everything (most code taken from "http://drupal.org/project/views_groupby"). My only problem is inside query(); I add a WHERE to the query with CONCAT(all fields) LIKE 'string'. My problem is when getting fields; i manage to get real_field, but I cannot get table_alias. Any hint? -- *Ser freak no és imprescindible per ser informàtic, però ajuda. *La vida no ha de ser feliç, ha de ser plena. *Abans d'imprimir aquest missatge, pensa en el medi ambient.
Solved; I found the information in $this->view->display['default']->handler->options['relationships']; 2011/10/26 Lluís Forns <enboig@gmail.com>:
I am developing a module to expose a filter which search for selectect text inside selected fields of a view.
I managed to code everything (most code taken from "http://drupal.org/project/views_groupby").
My only problem is inside query(); I add a WHERE to the query with CONCAT(all fields) LIKE 'string'. My problem is when getting fields; i manage to get real_field, but I cannot get table_alias.
Any hint?
-- *Ser freak no és imprescindible per ser informàtic, però ajuda. *La vida no ha de ser feliç, ha de ser plena. *Abans d'imprimir aquest missatge, pensa en el medi ambient.
-- *Ser freak no és imprescindible per ser informàtic, però ajuda. *La vida no ha de ser feliç, ha de ser plena. *Abans d'imprimir aquest missatge, pensa en el medi ambient.
participants (1)
-
Lluís Forns