Unverified Commit 09fb5ce7 authored by alexpott's avatar alexpott
Browse files

Issue #3054317 by iuana, yogeshmpawar, Berdir: Move...

Issue #3054317 by iuana, yogeshmpawar, Berdir: Move FieldLayoutEntityFormDisplay::getDefaultRegion() and FieldLayoutEntityViewDisplay::getDefaultRegion() to FieldLayoutEntityDisplayTrait
parent ba5cf8e2
......@@ -151,4 +151,11 @@ public function calculateDependencies() {
return $this;
}
/**
* Implements \Drupal\field_layout\Display\EntityDisplayWithLayoutInterface::getDefaultRegion().
*/
public function getDefaultRegion() {
return $this->getLayoutDefinition($this->getLayoutId())->getDefaultRegion();
}
}
......@@ -12,14 +12,4 @@ class FieldLayoutEntityFormDisplay extends EntityFormDisplay implements EntityDi
use FieldLayoutEntityDisplayTrait;
/**
* {@inheritdoc}
*/
public function getDefaultRegion() {
// This cannot be provided by the trait due to
// https://bugs.php.net/bug.php?id=71414 which is fixed in PHP 7.0.6.
// @todo Move to trait. https://www.drupal.org/node/3054317
return $this->getLayoutDefinition($this->getLayoutId())->getDefaultRegion();
}
}
......@@ -12,14 +12,4 @@ class FieldLayoutEntityViewDisplay extends EntityViewDisplay implements EntityDi
use FieldLayoutEntityDisplayTrait;
/**
* {@inheritdoc}
*/
public function getDefaultRegion() {
// This cannot be provided by the trait due to
// https://bugs.php.net/bug.php?id=71414 which is fixed in PHP 7.0.6.
// @todo Move to trait. https://www.drupal.org/node/3054317
return $this->getLayoutDefinition($this->getLayoutId())->getDefaultRegion();
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment