Issue #2057227 by vijaycs85, YesCT, Gábor Hojtsy: Fixed Field instance needs uri() method different from the default.
parent
552ed3b356
commit
c3be1f10ee
|
@ -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}
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue