// Process other options, string filter, query limit, etc.
if (!
empty($options['filters'
])) { if (count($options['filters'
]) > 1
) { $filter =
$this->connection->
condition('OR'
);
$query->
condition($filter);
} else { // If we have a single filter, just add it to the query.
$filter =
$query;
} foreach ($options['filters'
] as $field =>
$string) { $filter->
condition($this->
dbFieldTable($field) . '.' .
$field, '%' .
$this->connection->
escapeLike($string) . '%', 'LIKE'
);
} } if (!
empty($options['pager limit'
])) { $query =
$query->
extend(PagerSelectExtender::
class)->
limit($options['pager limit'
]);
} return $query;
} /**
* Creates a database record for a string object.
*
* @param \Drupal\locale\StringInterface $string
* The string object.
*
* @return bool|int
* If the operation failed, returns FALSE.
* If it succeeded returns the last insert ID of the query, if one exists.
*
* @throws \Drupal\locale\StringStorageException
* If the string is not suitable for this storage, an exception is thrown.
*/