function FieldLayoutEntityDisplayTrait::doGetLayout

Same name in other branches
  1. 9 core/modules/field_layout/src/Entity/FieldLayoutEntityDisplayTrait.php \Drupal\field_layout\Entity\FieldLayoutEntityDisplayTrait::doGetLayout()
  2. 10 core/modules/field_layout/src/Entity/FieldLayoutEntityDisplayTrait.php \Drupal\field_layout\Entity\FieldLayoutEntityDisplayTrait::doGetLayout()
  3. 11.x 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);
}

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