function EntityTypeInfo::fieldInfoAlter
Same name in other branches
- 9 core/modules/workspaces/src/EntityTypeInfo.php \Drupal\workspaces\EntityTypeInfo::fieldInfoAlter()
- 8.9.x 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 115
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']);
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.