-
-
Save vinmassaro/e04eb1181824561b3f35 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function my_module_views_query_alter(&$view, &$query) { | |
if ($view->name == 'faculty') { | |
// Traverse through the 'where' part of the query. | |
foreach ($query->where as &$condition_group) { | |
foreach ($condition_group['conditions'] as &$condition) { | |
if (is_object($condition['field'])) { | |
$conditions = &$condition['field']->conditions(); | |
dpm($conditions[1]['field']->conditions()); | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment