You are here

public function FormModeManagerDisplayEditForm::defaultDisplayModes in Form mode manager 8

Same name and namespace in other branches
  1. 8.2 src/Form/FormModeManagerDisplayEditForm.php \Drupal\form_mode_manager\Form\FormModeManagerDisplayEditForm::defaultDisplayModes()

Retrieve all form-modes selected before changes.

Parameters

array $form: An associative array containing the structure of the form.

Return value

array An array with all form-modes selected or empty.

1 call to FormModeManagerDisplayEditForm::defaultDisplayModes()
FormModeManagerDisplayEditForm::formModesUpdated in src/Form/FormModeManagerDisplayEditForm.php
Determine whenever a formMode(s) has added/deleted onto entityTypes.

File

src/Form/FormModeManagerDisplayEditForm.php, line 150

Class

FormModeManagerDisplayEditForm
Form Mode Manager enhancements for edit form of the EntityFormDisplay.

Namespace

Drupal\form_mode_manager\Form

Code

public function defaultDisplayModes(array $form) {
  $display_modes = $this
    ->getDefaultModes($form);
  if (!empty($display_modes)) {
    return $display_modes;
  }
  return [];
}