Skip to content

Commit

Permalink
Switch to use schema to define rel_type as translatable. (#93)
Browse files Browse the repository at this point in the history
  • Loading branch information
rosiel authored Jan 25, 2023
1 parent a808672 commit f576fe4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion config/schema/controlled_access_terms.schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ field.field_settings.typed_relation:
rel_types:
type: sequence
sequence:
type: string
type: label

field.storage_settings.edtf:
type: field.storage_settings.string
Expand Down
2 changes: 1 addition & 1 deletion src/Plugin/Field/FieldFormatter/TypedRelationFormatter.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function viewElements(FieldItemListInterface $items, $langcode) {
$rel_types = $item->getRelTypes();
$rel_type = isset($rel_types[$item->rel_type]) ? $rel_types[$item->rel_type] : $item->rel_type;
if (!empty($rel_type)) {
$elements[$delta]['#prefix'] = $this->t($rel_type) . ': ';
$elements[$delta]['#prefix'] = $rel_type . ': ';
}
}

Expand Down

0 comments on commit f576fe4

Please sign in to comment.