drupal-code-generator
drupal-code-generator copied to clipboard
Provide a replacement for Drupal Console generate:ajax:command
I just read through https://weknowinc.com/blog/creating-custom-ajax-command-drupal-8 as I need a custom AJAX Command (AjaxResponse).
I first looked into drush gen but couldn't find a command for that. drupal generate:ajax:command shows:
drupal.sh is deprecated in drupal:10.1.0 and is removed from drupal:11.0.0. There is no replacement. See https://www.drupal.org/node/3241346
The command can be found here: https://github.com/hechoendrupal/drupal-console-en/blob/master/translations/generate.ajax.command.yml
Describe the solution you'd like to propose Provide a drush gen replacement for that command to generate custom AjaxResponse Commands.
Previous request #63
Thanks @Chi-teck! It's used to provide further AJAX actions additional to the core ones: https://www.drupal.org/docs/drupal-apis/ajax-api/core-ajax-callback-commands
For example, to execute custom JS code via PHP to run APIs or other JavaScript stuff with AJAX.