You are here

protected function EntityViewDisplayEditForm::getOverviewUrl in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/field_ui/src/Form/EntityViewDisplayEditForm.php \Drupal\field_ui\Form\EntityViewDisplayEditForm::getOverviewUrl()

Returns the Url object for a specific entity (form) display edit form.

Parameters

string $mode: The form or view mode.

Return value

\Drupal\Core\Url A Url object for the overview route.

Overrides EntityDisplayFormBase::getOverviewUrl

File

core/modules/field_ui/src/Form/EntityViewDisplayEditForm.php, line 132
Contains \Drupal\field_ui\Form\EntityViewDisplayEditForm.

Class

EntityViewDisplayEditForm
Edit form for the EntityViewDisplay entity type.

Namespace

Drupal\field_ui\Form

Code

protected function getOverviewUrl($mode) {
  $entity_type = $this->entityManager
    ->getDefinition($this->entity
    ->getTargetEntityTypeId());
  return Url::fromRoute('entity.entity_view_display.' . $this->entity
    ->getTargetEntityTypeId() . '.view_mode', [
    'view_mode_name' => $mode,
  ] + FieldUI::getRouteBundleParameter($entity_type, $this->entity
    ->getTargetBundle()));
}