generate:plugin:rules:action
Generate a plugin rule action
Usage:
drupal generate:plugin:rules:action [options]
gpra
Available options
Option | Details |
---|---|
--module | A modul neve. |
--class | Plugin class |
--label | Plugin label |
--plugin-id | Plugin id |
--category | Plugin category |
--context | Plugin context |
Examples
Generate a user rule action plugin specifying the module name, the class, its label, the plugin id, the type, the category and its context
drupal generate:plugin:rules:action \
--module="modulename" \
--class="DefaultAction" \
--label="Default Action" \
--plugin-id="default_action" \
--category="Action category" \
--context='"name":"user", "type":"entity:user", "label":"Context label", "description":"Context description"'
Generate a entity rule action plugin specifying the module name, the class, its label, the plugin id, the type, the category and its context
drupal generate:plugin:rules:action \
--module="modulename" \
--class="DefaultAction" \
--label="Default Action" \
--plugin-id="default_action" \
--category="Action category" \
--context='"entity":"node", "type":"entity", "label":"Context label", "description":"Context description"'