You are here

public function FormModeManagerDisplayEditForm::submittedDisplayModes 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::submittedDisplayModes()

Retrieve all form-modes submitted form-modes.

Parameters

\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.

Return value

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

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

File

src/Form/FormModeManagerDisplayEditForm.php, line 168

Class

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

Namespace

Drupal\form_mode_manager\Form

Code

public function submittedDisplayModes(FormStateInterface $form_state) {
  $display_modes = $this
    ->getSubmittedModes($form_state);
  if (!empty($display_modes) && is_array($display_modes)) {
    return array_keys($display_modes);
  }
  return [];
}