generate:plugin:rules:action

Generate a plugin rule action

Utilização:

drupal generate:plugin:rules:action  [options]
gpra

Opções disponíveis

OpçãoDetalhes

--module

O nome do módulo.

--class

Plugin class

--label

Plugin label

--plugin-id

Plugin id

--category

Plugin category

--context

Plugin context

Exemplos

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"'