You are here

public function FormModeManagerForm::setSettingsPerEntity in Form mode manager 8.2

Set settings per compatible entities.

Parameters

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

array $form_modes: The form modes collection for given entity type.

string $entity_type_id: The entity type ID of entity.

Return value

$this|false The form Object.

Overrides FormModeManagerFormBase::setSettingsPerEntity

File

src/Form/FormModeManagerForm.php, line 94

Class

FormModeManagerForm
Configure Form Mode Manager common settings.

Namespace

Drupal\form_mode_manager\Form

Code

public function setSettingsPerEntity(FormStateInterface $form_state, array $form_modes, $entity_type_id) {
  $this->settings
    ->set("form_modes.{$entity_type_id}.to_exclude", $form_state
    ->getValue('element_' . $entity_type_id));
}