attus/devutil

Developer Utilities

Installs: 252

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Type:drupal-module

1.14.2 2023-07-07 14:22 UTC

This package is auto-updated.

Last update: 2024-04-07 16:01:11 UTC


README

A tool for creating Drupal code quick through drush commands.

Maintenance GitHub license GitHub release GitHub issues

Install:

composer require attus/devutil:^1.0 --dev
drush en devutil

New Entity Type

Content Entity Type

drush devu-nt-ent entity_type_name "Entity Type Label" 
  --bundles 
  --bundle-classes 
  --module=existing_module_name 
  --path=module_relative_path 
  --name="Your Name"

Configuration Entity Type

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.

New class based entity bundle

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"

New Annotation Plugin

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.