Skip to content

Commit

Permalink
Fix field prefix issue
Browse files Browse the repository at this point in the history
  • Loading branch information
shishir-intelli committed Nov 21, 2023
1 parent 9c6889e commit d7cdb3a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/FieldAttributeConverter.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,11 @@ public function __construct(EntityFieldManagerInterface $entity_field_manager, F
* Prefix of the field.
*/
protected function getFieldPrefix(): string {
return (string) $this->config->get('field_ui.settings')->get('field_prefix');
// If the Field UI module is installed, and has a specific prefix
// configured, use that. Otherwise, just default to using 'field_' as
// a prefix, which is the default that Field UI ships with.
$prefix = $this->config->get('field_ui.settings')->get('field_prefix') !== NULL ? $this->config->get('field_ui.settings')->get('field_prefix') : 'field_';
return (string) $prefix;
}

/**
Expand Down

0 comments on commit d7cdb3a

Please sign in to comment.