function entity_test_constraints_entity_type_alter in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/system/tests/modules/entity_test_constraints/entity_test_constraints.module \entity_test_constraints_entity_type_alter()
Implements hook_entity_type_alter().
File
- core/
modules/ system/ tests/ modules/ entity_test_constraints/ entity_test_constraints.module, line 22 - Test module file.
Code
function entity_test_constraints_entity_type_alter(array &$entity_types) {
if ($alter = \Drupal::state()
->get('entity_test_constraints.alter')) {
$entity_types['entity_test_constraints']
->setConstraints($alter);
}
}