function Callbacks::advancedCommandsAnnouncePoliteCallback
Ajax form callback: Selects 'announce' with 'polite' priority.
File
-
core/
modules/ system/ tests/ modules/ ajax_forms_test/ src/ Callbacks.php, line 120
Class
- Callbacks
- Simple object for testing methods as Ajax callbacks.
Namespace
Drupal\ajax_forms_testCode
public static function advancedCommandsAnnouncePoliteCallback($form, FormStateInterface $form_state) : AjaxResponse {
return (new AjaxResponse())->addCommand(new AnnounceCommand('Polite announcement.', 'polite'));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.