function DefaultsEntityForm::getEntityFromRouteMatch
Same name in other branches
- 9 core/modules/layout_builder/src/Form/DefaultsEntityForm.php \Drupal\layout_builder\Form\DefaultsEntityForm::getEntityFromRouteMatch()
- 10 core/modules/layout_builder/src/Form/DefaultsEntityForm.php \Drupal\layout_builder\Form\DefaultsEntityForm::getEntityFromRouteMatch()
- 11.x core/modules/layout_builder/src/Form/DefaultsEntityForm.php \Drupal\layout_builder\Form\DefaultsEntityForm::getEntityFromRouteMatch()
Overrides EntityForm::getEntityFromRouteMatch
File
-
core/
modules/ layout_builder/ src/ Form/ DefaultsEntityForm.php, line 167
Class
- DefaultsEntityForm
- Provides a form containing the Layout Builder UI for defaults.
Namespace
Drupal\layout_builder\FormCode
public function getEntityFromRouteMatch(RouteMatchInterface $route_match, $entity_type_id) {
$route_parameters = $route_match->getParameters()
->all();
return $this->entityTypeManager
->getStorage('entity_view_display')
->load($route_parameters['entity_type_id'] . '.' . $route_parameters['bundle'] . '.' . $route_parameters['view_mode_name']);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.