function EntityDisplayFormBase::getEntityFromRouteMatch

Same name in other branches
  1. 9 core/modules/field_ui/src/Form/EntityDisplayFormBase.php \Drupal\field_ui\Form\EntityDisplayFormBase::getEntityFromRouteMatch()
  2. 8.9.x core/modules/field_ui/src/Form/EntityDisplayFormBase.php \Drupal\field_ui\Form\EntityDisplayFormBase::getEntityFromRouteMatch()
  3. 11.x core/modules/field_ui/src/Form/EntityDisplayFormBase.php \Drupal\field_ui\Form\EntityDisplayFormBase::getEntityFromRouteMatch()

Overrides EntityForm::getEntityFromRouteMatch

File

core/modules/field_ui/src/Form/EntityDisplayFormBase.php, line 93

Class

EntityDisplayFormBase
Base class for EntityDisplay edit forms.

Namespace

Drupal\field_ui\Form

Code

public function getEntityFromRouteMatch(RouteMatchInterface $route_match, $entity_type_id) {
    $route_parameters = $route_match->getParameters()
        ->all();
    return $this->getEntityDisplay($route_parameters['entity_type_id'], $route_parameters['bundle'], $route_parameters[$this->displayContext . '_mode_name']);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.