You are here

protected function FieldLayoutEntityDisplayTrait::doGetLayout in Drupal 9

Same name and namespace in other branches
  1. 8 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.

1 call to FieldLayoutEntityDisplayTrait::doGetLayout()
FieldLayoutEntityDisplayTrait::getLayout in core/modules/field_layout/src/Entity/FieldLayoutEntityDisplayTrait.php
Implements \Drupal\field_layout\Display\EntityDisplayWithLayoutInterface::getLayout().

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);
}