Skip to content
Snippets Groups Projects
Commit c3be1f10 authored by Angie Byron's avatar Angie Byron
Browse files

Issue #2057227 by vijaycs85, YesCT, Gábor Hojtsy: Fixed Field instance needs...

Issue #2057227 by vijaycs85, YesCT, Gábor Hojtsy: Fixed Field instance needs uri() method different from the default.
parent 552ed3b3
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -534,6 +534,26 @@ public function isFieldTranslatable() {
return $this->field->translatable;
}
/**
* {@inheritdoc}
*/
public function uri() {
$path = \Drupal::entityManager()->getAdminPath($this->entity_type, $this->bundle);
// Use parent URI as fallback, if path is empty.
if (empty($path)) {
return parent::uri();
}
return array(
'path' => $path . '/fields/' . $this->id(),
'options' => array(
'entity_type' => $this->entityType,
'entity' => $this,
),
);
}
/**
* {@inheritdoc}
*/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment