4f0c27402f6efc864ef47c2bfffc3a4de5bbc75a
[yaffs-website] / web / core / modules / field_layout / src / Entity / FieldLayoutEntityViewDisplay.php
1 <?php
2
3 namespace Drupal\field_layout\Entity;
4
5 use Drupal\Core\Entity\Entity\EntityViewDisplay;
6 use Drupal\field_layout\Display\EntityDisplayWithLayoutInterface;
7
8 /**
9  * Provides an entity view display entity that has a layout.
10  */
11 class FieldLayoutEntityViewDisplay extends EntityViewDisplay implements EntityDisplayWithLayoutInterface {
12
13   use FieldLayoutEntityDisplayTrait;
14
15   /**
16    * {@inheritdoc}
17    */
18   public function getDefaultRegion() {
19     // This cannot be provided by the trait due to
20     // https://bugs.php.net/bug.php?id=71414 which is fixed in PHP 7.0.6.
21     return $this->getLayoutDefinition($this->getLayoutId())->getDefaultRegion();
22   }
23
24 }