$component['region'
] =
$new_region;
$this->
setComponent($name,
$component);
} } } $this->
setThirdPartySetting('field_layout', 'id',
$layout_id);
// Instantiate the plugin and consult it for the updated plugin
// configuration. Once layouts are no longer stored as third party settings,
// this will be handled by the code in
// \Drupal\Core\Config\Entity\ConfigEntityBase::set() that handles
// \Drupal\Core\Entity\EntityWithPluginCollectionInterface.
$layout_settings =
$this->
doGetLayout($layout_id,
$layout_settings)->
getConfiguration();
$this->
setThirdPartySetting('field_layout', 'settings',
$layout_settings);
return $this;
} /**
* Implements \Drupal\field_layout\Display\EntityDisplayWithLayoutInterface::setLayout().
*/
public function setLayout(LayoutInterface
$layout) { $this->
setLayoutId($layout->
getPluginId(),
$layout->
getConfiguration());
return $this;
}