Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide a replacement for Drupal Console generate:ajax:command #120

Open
JPustkuchen opened this issue Dec 22, 2023 · 2 comments
Open

Provide a replacement for Drupal Console generate:ajax:command #120

JPustkuchen opened this issue Dec 22, 2023 · 2 comments

Comments

@JPustkuchen
Copy link

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.

@Chi-teck
Copy link
Owner

Chi-teck commented Dec 22, 2023

Previous request #63

@JPustkuchen
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants