Tạo một plugin rule action
Usage:
drupal generate:plugin:rulesaction [options]
gpra
Option | Details |
---|---|
--module | Tên module. |
--class | Tên lớp plugin |
--label | Nhãn plugin |
--plugin-id | Plugin id |
--type | Kiểu hành vi (user or node) |
--category | Danh mục plugin |
--context | Ngữ cảnh plugin |
- 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:rulesaction \
--module="modulename" \
--class="DefaultAction" \
--label="Default action" \
--plugin-id="default_action" \
--type="user" \
--category="default_action" \
--context="default_action"
- Generate a node rule action plugin specifying the module name, the class, its label, the plugin id, the type, the category and its context
drupal generate:plugin:rulesaction \
--module="modulename" \
--class="DefaultAction" \
--label="Default action" \
--plugin-id="default_action" \
--type="node" \
--category="default_action" \
--context="default_action"