You are here

protected function FieldLayoutEntityDisplayTrait::doGetLayout in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/field_layout/src/Entity/FieldLayoutEntityDisplayTrait.php \Drupal\field_layout\Entity\FieldLayoutEntityDisplayTrait::doGetLayout()
  2. 9 core/modules/field_layout/src/Entity/FieldLayoutEntityDisplayTrait.php \Drupal\field_layout\Entity\FieldLayoutEntityDisplayTrait::doGetLayout()

Gets the layout plugin.

Parameters

string $layout_id: A layout plugin ID.

array $layout_settings: An array of settings.

Return value

\Drupal\Core\Layout\LayoutInterface The layout plugin.

File

core/modules/field_layout/src/Entity/FieldLayoutEntityDisplayTrait.php, line 98

Class

FieldLayoutEntityDisplayTrait
Provides shared code for entity displays.

Namespace

Drupal\field_layout\Entity

Code

protected function doGetLayout($layout_id, array $layout_settings) {
  return \Drupal::service('plugin.manager.core.layout')
    ->createInstance($layout_id, $layout_settings);
}