dmwg / wisski_entity_reference_tree
WissKI 的实体引用树构建器。
Requires
- php: >=8.2
Requires (Dev)
- drupal/coder: ^8.3
- ergebnis/composer-normalize: ^2.42
- mglaman/phpstan-drupal: ^1.2
- phpstan/extension-installer: ^1.3
- phpstan/phpstan: ^1.10
- phpstan/phpstan-deprecation-rules: ^1.1
- thecodingmachine/phpstan-strict-rules: ^1.0
- dev-main
- 0.1.0
- dev-dependabot/composer/ergebnis/composer-normalize-2.44.0
- dev-dependabot/composer/phpstan/phpstan-1.12.5
- dev-dependabot/composer/mglaman/phpstan-drupal-1.3.1
- dev-dependabot/composer/drupal/coder-8.3.25
- dev-dependabot/composer/phpstan/phpstan-deprecation-rules-1.2.1
- dev-dependabot/composer/phpstan/extension-installer-1.4.3
- dev-require-module-dependency
This package is auto-updated.
Last update: 2024-10-01 09:21:46 UTC
README
一个扩展 drupal/entity_reference_tree 的 Drupal 模块,通过路径构建器中的消歧点配置实体层次结构,例如标签或其他分类法形式。此模块依赖于 drupal/entity_reference_tree 并在 2.1.0 版本上成功测试。
注意: 此模块依赖于在 src/web/modules/contrib/entity_reference_tree/src/Controller/EntityReferenceTreeController.php:104 中定义的其他树构建器的动态分派。如果此分派消失,此模块将 损坏(或者至少停止工作,这与损坏相同)。
在 drupal/entity_reference_tree 中所需的动态分派
// Instance a entity tree builder for this entity type if it exists. if (\Drupal::hasService('entity_reference_' . $entity_type . '_tree_builder')) { $treeBuilder = \Drupal::service('entity_reference_' . $entity_type . '_tree_builder'); }
要求
安装
$ composer require dmwg/wisski_entity_reference_tree
用法
- 通过
/admin/modules启用此模块以及drupal/entity_reference_tree - 在
/admin/structure/下,配置所需的包- 转到
管理表单显示 - 对于所需字段,将类型设置为 "实体引用树"
- (可选)配置小部件的主题和其他布局属性
- 转到
贡献
我们欢迎通过此存储库的拉取请求提交所有和任何贡献!
本地开发环境
对于本地开发,强烈建议将此模块安装到现有的 Drupal 代码库中,例如在 web/modules/custom 下。此外,我们建议至少安装一个基本的 WissKI(例如,请参阅 drupal/wisski)。这将提供更丰富的基于 Drupal 的代码完成,以及 WissKI 特定的代码。
重要: 没有本地 Drupal 安装,通过 phpstan 进行的静态分析将失败,因为它依赖于 Drupal 自动加载器。
以下示例假定已安装,并克隆到 web/modules/custom
$ cd <DRUPAL_ROOT>/web/modules/custom $ git clone https://github.com/dmwg/wisski_entity_reference_tree $ cd wisski_entity_reference $ composer install
代码检查与静态分析
请运行 vendor/bin/phpcs --standard=Drupal 并修复任何标记的错误;vendor/bin/phpcbf --standard=Drupal src 可帮助修复。
请运行 vendor/bin/phpstan 并修复任何错误;不要让构建失败阻止你,我们将在 PR 中尽力解决。
作者与致谢
Oliver Baumann <oliver.baumann@uni-bayreuth.de>- 重构与维护
Myriel Fichtner- 概念与原始版本
Philipp Eisenhuth- 概念与原始版本
项目状态
活跃,但休眠。
