A tool for creating Drupal code quick through drush commands.
Install:
composer require attus/devutil:^1.0 --dev
drush en devutil
drush devu-nt-ent entity_type_name "Entity Type Label"
--bundles
--bundle-classes
--module=existing_module_name
--path=module_relative_path
--name="Your Name"
drush devu-nf-ent entity_type_name "Entity Type Label"
--module=existing_module_name
--path=module_relative_path
--name="Your Name"
Either the name of a module or a path for a new module shall be used. Path shall be relative to Web folder, e.g. "modules/custom".
Use the bundles argument, if you want your new custom contenty entity type to have bundles. In order to create Entity Bundle Classes, use both the bundles and the bundle-classes options.
This command works only if the entity type already exists and is active (i.e. the module defining it is active).
drush devu-nt-bundle entity_type_id bundle_id "Bundle Label" --name="Your Name"
drush devu-plugin plugin_name --module=existing_module_name --name="Your Name"
You're free to use this module without any restriction but without any warranty.