Problem/Motivation

It looks like @Event tags are used to tag methods that provide events to the Drupal events system.

Here's an example from the current API: https://api.drupal.org/api/drupal/core%21modules%21layout_builder%21src%...

In the Doctum cache, the @Event tag just shows up as an empty array under "tags", which makes sense because it wraps no content.But that does mean we can just use its presence as a flag to start doing interesting thing.

"constants": {
        "SECTION_COMPONENT_BUILD_RENDER_ARRAY": {
            "name": "SECTION_COMPONENT_BUILD_RENDER_ARRAY",
            "line": 27,
            "short_desc": "Name of the event fired when a component's render array is built.",
            "long_desc": "This event allows modules to collaborate on creating the render array of\nthe SectionComponent object. The event listener method receives a\n\\Drupal\\layout_builder\\Event\\SectionComponentBuildRenderArrayEvent\ninstance.",
            "modifiers": 0,
            "tags": {
                "Event": [
                    [
                        ""
                    ]
                ],
                "see": [
                    [
                        "\\Drupal\\layout_builder\\Event\\SectionComponentBuildRenderArrayEvent"
                    ],
                    [
                        "\\Drupal\\layout_builder\\SectionComponent::toRenderArray()"
                    ]
                ]
            }
        },

Right now, we mostly just need to understand how this tag provides value in documentation.

Should these methods be tagged? Grouped? Do we just need a little badge element on event methods?

Steps to reproduce

Proposed resolution

Remaining tasks

  • Gather requirements for implementation
  • Decide implementation path
  • Implement api needs
  • Implement theme needs

User interface changes

API changes

Data model changes

Comments

abenbow created an issue.