You are here

public function FieldEntry::validateConfigurationForm in Flag 8.4

Validates the action link setting form.

Derived classes will want to override this method.

Parameters

array $form: The form array.

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

Overrides FormEntryTypeBase::validateConfigurationForm

File

src/Plugin/ActionLink/FieldEntry.php, line 84

Class

FieldEntry
Class FieldEntry

Namespace

Drupal\flag\Plugin\ActionLink

Code

public function validateConfigurationForm(array &$form, FormStateInterface $form_state) {
  parent::validateConfigurationForm($form, $form_state);
  $form_values = $form_state
    ->getValues();
  if (empty($form_values['edit_flagging'])) {
    $form_state
      ->setErrorByName('flagging_edit_title', $this
      ->t('An edit flagging details message is required when using the field entry link type.'));
  }
}