public function EntityQueryAlter::alter in Group 2.0.x
Same name and namespace in other branches
- 8 src/QueryAccess/EntityQueryAlter.php \Drupal\group\QueryAccess\EntityQueryAlter::alter()
Alters the select query for the given entity type.
Parameters
\Drupal\Core\Database\Query\SelectInterface $query: The select query.
\Drupal\Core\Entity\EntityTypeInterface $entity_type: The entity type.
File
- src/
QueryAccess/ EntityQueryAlter.php, line 149
Class
- EntityQueryAlter
- Defines a class for altering entity queries.
Namespace
Drupal\group\QueryAccessCode
public function alter(SelectInterface $query, EntityTypeInterface $entity_type) {
$this
->doAlter($query, $entity_type, $query
->getMetaData('op') ?: 'view');
$this
->applyCacheability();
}