Skip to main content
Improved explanation in comments
Source Link
Kana
  • 545
  • 5
  • 10

I guess you need to use hook_views_query_alter and then you could add your OR condition.

function hook_views_query_alter(ViewExecutable $view, QueryPluginBase $query) {
  if ($view->id() == 'machine_name_of_your_view' ) {
   //$query->where contains the filter conditions 
   //i.e. AND'Where' part of the query where you could add yours.
   print_rvar_dump($query->where);die;
  }
}

more from drupal.org

I guess you need to use hook_views_query_alter and then you could add your OR condition.

function hook_views_query_alter(ViewExecutable $view, QueryPluginBase $query) {
  if ($view->id() == 'machine_name_of_your_view' ) {
   //$query->where contains the filter conditions 
   //i.e. AND part of the query where you could add yours.
   print_r($query->where);die;
  }
}

more from drupal.org

I guess you need to use hook_views_query_alter and then you could add your OR condition.

function hook_views_query_alter(ViewExecutable $view, QueryPluginBase $query) {
  if ($view->id() == 'machine_name_of_your_view' ) {
   //$query->where contains the filter conditions 
   //i.e. 'Where' part of the query where you could add yours.
   var_dump($query->where);die;
  }
}

more from drupal.org

Source Link
Kana
  • 545
  • 5
  • 10

I guess you need to use hook_views_query_alter and then you could add your OR condition.

function hook_views_query_alter(ViewExecutable $view, QueryPluginBase $query) {
  if ($view->id() == 'machine_name_of_your_view' ) {
   //$query->where contains the filter conditions 
   //i.e. AND part of the query where you could add yours.
   print_r($query->where);die;
  }
}

more from drupal.org