drupal 8 query condition code example
Example: drupal 8 database query or condition
$orGroup = $query->orConditionGroup()
->condition('promoted', 1)
->condition('uid', [2,4,7,22], 'IN');
// Add the group to the query.
$query->condition($orGroup);