generate:plugin:block

Generar un connector de bloc

Usage:

drupal generate:plugin:block  [options]
gpb

Available options

OptionDetails

--module

Nom del mòdul.

--class

Nom de la classe del connector

--plugin-label

Plugin label

--plugin-id

Identificador del connector

--theme-region

Regió del tema per renderitzar el connector de bloc

--inputs

Crear camp entrada (input) en un formulari.

--services

Carregar serveis des del contenidor.

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