Issue #2057227 by vijaycs85, YesCT, Gábor Hojtsy: Fixed Field instance needs uri() method different from the default.

8.0.x
webchick 2013-08-15 10:59:35 -07:00
parent 552ed3b356
commit c3be1f10ee
1 changed files with 20 additions and 0 deletions

View File

@ -534,6 +534,26 @@ class FieldInstance extends ConfigEntityBase implements FieldInstanceInterface {
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}
*/