Commit c3be1f10 authored by webchick's avatar webchick

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
......@@ -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}
*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment