Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function mymodule_views_query_alter(ViewExecutable $view, QueryPluginBase $query) {
- foreach($query->where as &$condition_group) {
- foreach($condition_group['conditions'] as &$conditions) {
- /**
- * my_field_name_value is the Linked Document->media.field_document_tag.target_id (taxonomy term id)
- */
- if($condition['field'] == 'my_field_name') {
- $condition = [
- 'field' => 'my_field_name',
- 'value' => 'my_field_name_value',
- 'operator' => '=',
- ];
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement