generate:plugin:fieldtype
Generar connector de tipus de camp.
Ús:
drupal generate:plugin:fieldtype [options]
gpft
Opcions disponibles
Opció | Detalls |
---|---|
--module | Nom del mòdul. |
--class | Nom de la classe del connector |
--label | Etiqueta del connector |
--plugin-id | Identificador del connector |
--description | Descripció del connector |
--default-widget | Giny de camp predeterminat d'aquest connector |
--default-formatter | Formatador de camp predeterminat d'aquest connector |
Exemples
- Generate a field type plugin specifying the module name, the class, its label, the plugin id and a description
drupal generate:plugin:fieldtype \ --module="modulename" \ --class="ExampleFieldType" \ --label="Example field type" \ --plugin-id="example_field_type" \ --description="My Field Type"
- Generate a field type plugin with a default widget and formatter specifying the module name, the class, its label, the plugin id and a description
drupal generate:plugin:fieldtype \ --module="modulename" \ --class="ExampleFieldType" \ --label="Example field type" \ --plugin-id="example_field_type" \ --description="My Field Type" \ --default-widget="DefaultWidget" \ --default-formatter="DefaultFormatter"