You are here

protected function EntityFormDisplayEditForm::getOverviewUrl in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/field_ui/src/Form/EntityFormDisplayEditForm.php \Drupal\field_ui\Form\EntityFormDisplayEditForm::getOverviewUrl()
  2. 10 core/modules/field_ui/src/Form/EntityFormDisplayEditForm.php \Drupal\field_ui\Form\EntityFormDisplayEditForm::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/EntityFormDisplayEditForm.php, line 109

Class

EntityFormDisplayEditForm
Edit form for the EntityFormDisplay entity type.

Namespace

Drupal\field_ui\Form

Code

protected function getOverviewUrl($mode) {
  $entity_type = $this->entityTypeManager
    ->getDefinition($this->entity
    ->getTargetEntityTypeId());
  return Url::fromRoute('entity.entity_form_display.' . $this->entity
    ->getTargetEntityTypeId() . '.form_mode', [
    'form_mode_name' => $mode,
  ] + FieldUI::getRouteBundleParameter($entity_type, $this->entity
    ->getTargetBundle()));
}