popsu-d9/old.vendor/drupal/console-en/translations/generate.entity.content.yml
2022-04-27 11:30:43 +02:00

47 lines
2.1 KiB
YAML

description: 'Generate a new content entity'
help: 'The <info>generate:content:entity</info> command helps you generate a new content entity.'
welcome: 'Welcome to the Drupal Content Entity generator'
options:
module: 'The Module name.'
entity-class: 'The content entity class'
entity-name: 'The content entity name'
label: 'The label'
has-bundles: 'Entity has bundles'
has-forms: 'Entity has forms'
has-owner: 'Entity has owner'
base-path: 'The base-path for the content entity routes'
is-translatable: 'Content entity translatable'
has-bundle-permissions: 'Permissions on bundle level'
questions:
module: 'Enter the module name'
entity-class: 'Enter the class of your new content entity'
entity-name: 'Enter the machine name of your new content entity'
label: 'Enter the label of your new content entity'
has-bundles: 'Do you want this (content) entity to have bundles?'
has-forms: 'Do you want this (content) entity to have forms?'
has-owner: 'Do you want this (content) entity to have an owner?'
base-path: 'Enter the base-path for the content entity routes'
is-translatable: 'Is your entity translatable?'
revisionable: 'Is your entity revisionable?'
has-bundle-permissions: 'Do you want this entity to have "per bundle" permissions?'
examples:
- description: 'Generate a content entity specifying the module, the entity class, the entity name, its path and label'
execution: |
drupal generate:entity:content \
--module="modulename" \
--entity-class="DefaultEntity" \
--entity-name="default_entity" \
--base-path="/admin/structure" \
--label="Default entity"
- description: 'Generate a translatable and revisionable content entity specifying the module, the entity class, the entity name, its path and label'
execution: |
drupal generate:entity:content \
--module="modulename" \
--entity-class="DefaultEntity" \
--entity-name="default_entity" \
--base-path="/admin/structure" \
--label="Default entity" \
--is-translatable \
--revisionable
--has-forms