protected function EntityDisplayFormBase::getDisplays in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/field_ui/src/Form/EntityDisplayFormBase.php \Drupal\field_ui\Form\EntityDisplayFormBase::getDisplays()
Returns entity (form) displays for the current entity display type.
Return value
\Drupal\Core\Entity\Display\EntityDisplayInterface[] An array holding entity displays or entity form displays.
2 calls to EntityDisplayFormBase::getDisplays()
- EntityDisplayFormBase::getDisplayStatuses in core/
modules/ field_ui/ src/ Form/ EntityDisplayFormBase.php - Returns form or view modes statuses for the bundle used by this form.
- EntityDisplayFormBase::saveDisplayStatuses in core/
modules/ field_ui/ src/ Form/ EntityDisplayFormBase.php - Saves the updated display mode statuses.
File
- core/
modules/ field_ui/ src/ Form/ EntityDisplayFormBase.php, line 836 - Contains \Drupal\field_ui\Form\EntityDisplayFormBase.
Class
- EntityDisplayFormBase
- Base class for EntityDisplay edit forms.
Namespace
Drupal\field_ui\FormCode
protected function getDisplays() {
$load_ids = array();
$display_entity_type = $this->entity
->getEntityTypeId();
$entity_type = $this->entityManager
->getDefinition($display_entity_type);
$config_prefix = $entity_type
->getConfigPrefix();
$ids = $this
->configFactory()
->listAll($config_prefix . '.' . $this->entity
->getTargetEntityTypeId() . '.' . $this->entity
->getTargetBundle() . '.');
foreach ($ids as $id) {
$config_id = str_replace($config_prefix . '.', '', $id);
list(, , $display_mode) = explode('.', $config_id);
if ($display_mode != 'default') {
$load_ids[] = $config_id;
}
}
return $this->entityManager
->getStorage($display_entity_type)
->loadMultiple($load_ids);
}