protected function ConfigEntityBundleBase::loadDisplays

protected ConfigEntityBundleBase::loadDisplays($entity_type_id)

Returns view or form displays for this bundle.

Parameters

string $entity_type_id: The entity type ID of the display type to load.

Return value

\Drupal\Core\Entity\Display\EntityDisplayInterface[] A list of matching displays.

File

core/lib/Drupal/Core/Config/Entity/ConfigEntityBundleBase.php, line 104

Class

ConfigEntityBundleBase
A base class for config entity types that act as bundles.

Namespace

Drupal\Core\Config\Entity

Code

protected function loadDisplays($entity_type_id) {
  $ids = \Drupal::entityQuery($entity_type_id)
    ->condition('id', $this->getEntityType()->getBundleOf() . '.' . $this->getOriginalId() . '.', 'STARTS_WITH')
    ->execute();
  if ($ids) {
    $storage = $this->entityManager()->getStorage($entity_type_id);
    return $storage->loadMultiple($ids);
  }
  return array();
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Config!Entity!ConfigEntityBundleBase.php/function/ConfigEntityBundleBase::loadDisplays/8.1.x