You are here

public function FieldLayoutEntityDisplayTrait::setLayout in Drupal 8

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

Implements \Drupal\field_layout\Display\EntityDisplayWithLayoutInterface::setLayout().

1 call to FieldLayoutEntityDisplayTrait::setLayout()
FieldLayoutEntityDisplayTrait::preSave in core/modules/field_layout/src/Entity/FieldLayoutEntityDisplayTrait.php
Overrides \Drupal\Core\Entity\EntityDisplayBase::preSave().

File

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

Class

FieldLayoutEntityDisplayTrait
Provides shared code for entity displays.

Namespace

Drupal\field_layout\Entity

Code

public function setLayout(LayoutInterface $layout) {
  $this
    ->setLayoutId($layout
    ->getPluginId(), $layout
    ->getConfiguration());
  return $this;
}