function EntityDisplayModeFormBase::getOverviewUrl
Same name in other branches
- 11.x core/modules/field_ui/src/Form/EntityDisplayModeFormBase.php \Drupal\field_ui\Form\EntityDisplayModeFormBase::getOverviewUrl()
Returns the Url object for a specific entity (form) display edit form.
Parameters
string $mode: The form or view mode.
string $bundle: The entity bundle name.
Return value
\Drupal\Core\Url A Url object for the overview route.
1 call to EntityDisplayModeFormBase::getOverviewUrl()
- EntityDisplayModeFormBase::save in core/
modules/ field_ui/ src/ Form/ EntityDisplayModeFormBase.php - Form submission handler for the 'save' action.
File
-
core/
modules/ field_ui/ src/ Form/ EntityDisplayModeFormBase.php, line 239
Class
- EntityDisplayModeFormBase
- Provides the generic base class for entity display mode forms.
Namespace
Drupal\field_ui\FormCode
private function getOverviewUrl($mode, $bundle) : Url {
$entity_type = $this->entityTypeManager
->getDefinition($this->targetEntityTypeId);
return match ($this->displayContext) { 'view' => Url::fromRoute('entity.entity_view_display.' . $this->targetEntityTypeId . '.view_mode', [
'view_mode_name' => $mode,
] + FieldUI::getRouteBundleParameter($entity_type, $bundle)),
'form' => Url::fromRoute('entity.entity_form_display.' . $this->targetEntityTypeId . '.form_mode', [
'form_mode_name' => $mode,
] + FieldUI::getRouteBundleParameter($entity_type, $bundle)),
};
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.