mglaman / drupal-change-record-triage

Used to triage Drupal change records to ensure phpstan-drupal, drupal-rector, and upgrade_status have appropriate issues.
MIT License
6 stars 0 forks source link

New API for defining field type categories #731

Closed github-actions[bot] closed 5 months ago

github-actions[bot] commented 9 months ago

https://www.drupal.org/node/3375748

Introduced in branch/version: 10.2.x / 10.2.0

A module can define field type categories in a MODULE_NAME.field_type_categories.yml file contained in the module's base directory.

Each plugin has the following structure:

CATEGORY_NAME:
   label: STRING
   description: STRING
   weight: INTEGER
   libraries:
     - STRING

The field type category info can be accessed with the help of the plugin methods getLabel(), getDescription(), and getWeight(), etc. These methods are available on the plugin instances retrieved using the YAML-based plugin discovery system.