You are here

public function EntityFlagType::submitConfigurationForm in Flag 8.4

Handles the form submit for this action link plugin.

Derived classes will want to override this.

Parameters

array $form: The form array.

FormStateInterface $form_state: The form state.

Overrides FlagTypeBase::submitConfigurationForm

1 call to EntityFlagType::submitConfigurationForm()
UserFlagType::submitConfigurationForm in src/Plugin/Flag/UserFlagType.php
Handles the form submit for this action link plugin.
1 method overrides EntityFlagType::submitConfigurationForm()
UserFlagType::submitConfigurationForm in src/Plugin/Flag/UserFlagType.php
Handles the form submit for this action link plugin.

File

src/Plugin/Flag/EntityFlagType.php, line 180

Class

EntityFlagType
Provides a flag type for all entity types.

Namespace

Drupal\flag\Plugin\Flag

Code

public function submitConfigurationForm(array &$form, FormStateInterface $form_state) {
  parent::submitConfigurationForm($form, $form_state);
  $this->configuration['show_in_links'] = array_filter($form_state
    ->getValue('show_in_links'));
  $this->configuration['show_as_field'] = $form_state
    ->getValue('show_as_field');
  $this->configuration['show_on_form'] = $form_state
    ->getValue('show_on_form');
  $this->configuration['show_contextual_link'] = $form_state
    ->getValue('show_contextual_link');
  $this->configuration['extra_permissions'] = $form_state
    ->getValue('extra_permissions');
}