generate:plugin:block
Generate a plugin block
Usage:
drupal generate:plugin:block [options]
gpb
Available options
Option | Details |
---|---|
--module | モジュール名 |
--class | Plugin class name |
--plugin-label | Plugin label |
--plugin-id | Plugin id |
--theme-region | Theme region to render Plugin Block |
--inputs | フォームへの入力を作成する |
--services | コンテナからサービスを読み込む |
--twigtemplate | Generate theme template |
Examples
Generate a plugin block in the header region with an input field specifying the module name, the class, the label, its id, the region and the input
drupal generate:plugin:block \
--module="modulename" \
--class="DefaultBlock" \
--label="Default block" \
--plugin-id="default_block" \
--theme-region="header" \
--inputs='"name":"inputtext", "type":"text_format", "label":"InputText", "options":"", "description":"Just an input text", "maxlength":"", "size":"", "default_value":"", "weight":"0", "fieldset":""'