public function FlagConfirmForm::submitForm in Flag 8.4
Form submission 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 FormInterface::submitForm
File
- src/
Form/ FlagConfirmForm.php, line 48
Class
- FlagConfirmForm
- Provides the confirm form page for flagging an entity.
Namespace
Drupal\flag\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
\Drupal::service('flag')
->flag($this->flag, $this->entity);
}