attus / devutil
开发者工具
1.14.2
2023-07-07 14:22 UTC
Requires
- drupal/core: ^10.1 || ^11.0
- nikic/php-parser: ^4.0
README
这是一个通过drush命令快速创建Drupal代码的工具。
安装
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"
应使用模块名称或新模块的路径。路径应相对于Web文件夹,例如:"modules/custom"。
如果想要新的自定义内容实体类型具有包,请使用bundles参数。为了创建实体包类,请同时使用bundles和bundle-classes选项。
新基于类的实体包
此命令仅在实体类型已存在且处于活动状态(即定义它的模块处于活动状态)时有效。
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"
您可以在没有任何限制的情况下使用此模块,但没有任何保证。