function DefaultsEntityForm::getEntityFromRouteMatch
Overrides EntityForm::getEntityFromRouteMatch
File
- 
              core/
modules/ layout_builder/ src/ Form/ DefaultsEntityForm.php, line 141  
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.