You are here

protected function EntityDisplayFormBase::getDisplayStatuses in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/field_ui/src/Form/EntityDisplayFormBase.php \Drupal\field_ui\Form\EntityDisplayFormBase::getDisplayStatuses()
  2. 9 core/modules/field_ui/src/Form/EntityDisplayFormBase.php \Drupal\field_ui\Form\EntityDisplayFormBase::getDisplayStatuses()

Returns form or view modes statuses for the bundle used by this form.

Return value

array An array of form or view mode statuses.

2 calls to EntityDisplayFormBase::getDisplayStatuses()
EntityDisplayFormBase::form in core/modules/field_ui/src/Form/EntityDisplayFormBase.php
Gets the actual form array to be built.
EntityDisplayFormBase::submitForm in core/modules/field_ui/src/Form/EntityDisplayFormBase.php
This is the default entity object builder function. It is called before any other submit handler to build the new entity object to be used by the following submit handlers. At this point of the form workflow the entity is validated and the form state…

File

core/modules/field_ui/src/Form/EntityDisplayFormBase.php, line 846

Class

EntityDisplayFormBase
Base class for EntityDisplay edit forms.

Namespace

Drupal\field_ui\Form

Code

protected function getDisplayStatuses() {
  $display_statuses = [];
  $displays = $this
    ->getDisplays();
  foreach ($displays as $display) {
    $display_statuses[$display
      ->get('mode')] = $display
      ->status();
  }
  return $display_statuses;
}