X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=vendor%2Fdrupal%2Fconsole%2Ftemplates%2Fmodule%2Fsrc%2FAjax%2Fajax-command.php.twig;fp=vendor%2Fdrupal%2Fconsole%2Ftemplates%2Fmodule%2Fsrc%2FAjax%2Fajax-command.php.twig;h=2e59019c39bd1513007f63d1dc5697dbf0d0ba60;hp=0000000000000000000000000000000000000000;hb=9917807b03b64faf00f6a1f29dcb6eafc454efa5;hpb=aea91e65e895364e460983b890e295aa5d5540a5 diff --git a/vendor/drupal/console/templates/module/src/Ajax/ajax-command.php.twig b/vendor/drupal/console/templates/module/src/Ajax/ajax-command.php.twig new file mode 100644 index 000000000..2e59019c3 --- /dev/null +++ b/vendor/drupal/console/templates/module/src/Ajax/ajax-command.php.twig @@ -0,0 +1,33 @@ +{% extends "base/class.php.twig" %} + +{% block file_path %} +\Drupal\{{ module }}\Ajax\{{ class_name }}. +{% endblock %} + +{% block namespace_class %} +namespace Drupal\{{ module }}\Ajax; +{% endblock %} + +{% block use_class %} +use Drupal\Core\Ajax\CommandInterface; +{% endblock %} +{% block class_declaration %} +/** + * Class {{ class_name }}. + */ +class {{ class_name }} implements CommandInterface {% endblock %} + +{% block class_methods %} + /** + * Render custom ajax command. + * + * @return ajax + * Command function. + */ + public function render() { + return [ + 'command' => '{{ method }}', + 'message' => 'My Awesome Message', + ]; + } +{% endblock %}