public function LinkitEditorDialog::validateForm in Linkit 8.4
Form validation handler.
Parameters
array $form: An associative array containing the structure of the form.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.
Overrides FormBase::validateForm
File
- src/
Form/ LinkitEditorDialog.php, line 135 - Contains \Drupal\linkit\Form\LinkitEditorDialog.
Class
- LinkitEditorDialog
- Provides a linkit dialog for text editors.
Namespace
Drupal\linkit\FormCode
public function validateForm(array &$form, FormStateInterface $form_state) {
$attributes = array_filter($form_state
->getValue('attributes'));
$form_state
->setValue('attributes', $attributes);
}