function unique_field_constraint_test_query_entity_test_access_alter

Same name and namespace in other branches
  1. 10 core/modules/system/tests/modules/unique_field_constraint_test/unique_field_constraint_test.module \unique_field_constraint_test_query_entity_test_access_alter()

Implements hook_query_entity_test_access_alter().

File

core/modules/system/tests/modules/unique_field_constraint_test/unique_field_constraint_test.module, line 28

Code

function unique_field_constraint_test_query_entity_test_access_alter(AlterableInterface $query) {
    // Set an impossible condition to filter out all entities.
    
    /** @var \Drupal\Core\Database\Query\Select|\Drupal\Core\Database\Query\AlterableInterface $query */
    $query->condition('entity_test.id', 0);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.