->
condition($entity_type->
getKey('id'
),
$ids, 'IN'
) ->
execute();
} return $result;
} /**
* {@inheritdoc}
*/
public function entityQueryAlter(SelectInterface
$query) { parent::
entityQueryAlter($query);
$tables =
$query->
getTables();
$data_table = 'comment_field_data';
if (!
isset($tables['comment_field_data'
]['alias'
])) { // If no conditions join against the comment data table, it should be
// joined manually to allow node access processing.
$query->
innerJoin($data_table, NULL, "[base_table].[cid] = [
$data_table].[cid] AND [
$data_table].[default_langcode] = 1"
);
} // Historically, comments were always linked to 'node' entities, but that is
// no longer the case, as the 'node' module might not even be enabled.