public function EntityTypeInfo::fieldInfoAlter in Drupal 8
Same name and namespace in other branches
- 9 core/modules/workspaces/src/EntityTypeInfo.php \Drupal\workspaces\EntityTypeInfo::fieldInfoAlter()
- 10 core/modules/workspaces/src/EntityTypeInfo.php \Drupal\workspaces\EntityTypeInfo::fieldInfoAlter()
Alters field plugin definitions.
Parameters
array[] $definitions: An array of field plugin definitions.
See also
File
- core/
modules/ workspaces/ src/ EntityTypeInfo.php, line 103
Class
- EntityTypeInfo
- Manipulates entity type information.
Namespace
Drupal\workspacesCode
public function fieldInfoAlter(&$definitions) {
if (isset($definitions['entity_reference'])) {
$definitions['entity_reference']['constraints']['EntityReferenceSupportedNewEntities'] = [];
}
// Allow path aliases to be changed in workspace-specific pending revisions.
if (isset($definitions['path'])) {
unset($definitions['path']['constraints']['PathAlias']);
}
}