Skip to content
Snippets Groups Projects
Commit efa94be5 authored by Roman Haluška's avatar Roman Haluška Committed by Christian López Espínola
Browse files

Issue #3194006 by dejan0, roman.haluska, Zevior: Remove deprecated or() method...

Issue #3194006 by dejan0, roman.haluska, Zevior: Remove deprecated or() method calls and use Condition instead
parent 5e37bbf3
No related branches found
No related tags found
No related merge requests found
......@@ -2,6 +2,7 @@
namespace Drupal\product_taxonomy_filter\Plugin\views\argument;
use Drupal\Core\Database\Query\Condition;
use Drupal\Core\Entity\EntityStorageInterface;
use Drupal\Core\Form\FormStateInterface;
use Drupal\taxonomy\Plugin\views\argument\IndexTidDepth;
......@@ -94,7 +95,8 @@ class IndexTidProductDepth extends IndexTidDepth {
// Now build the subqueries.
$subquery = \Drupal::database()->select($refTableName, 'pt');
$subquery->addField('pt', 'entity_id');
$where = db_or()->condition('pt.' . $refFieldName, $tids, $operator);
$where = new Condition('OR');
$where->condition('pt.' . $refFieldName, $tids, $operator);
$last = "pt";
if ($this->options['depth'] > 0) {
......
......@@ -88,7 +88,8 @@ class TaxonomyIndexProductTidDepth extends TaxonomyIndexTid {
// Now build the subqueries.
$subquery = \Drupal::database()->select($refTableName, 'tn');
$subquery->addField('tn', 'entity_id');
$where = (new Condition('OR'))->condition('tn.'. $refFieldName, $this->value, $operator);
$where = new Condition('OR');
$where->condition('tn.' . $refFieldName, $this->value, $operator);
$last = "tn";
if ($this->options['depth'] > 0) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment