API page: https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Hook%21At...
We call the class "Legacy"; there is clearly a new way. We should link to it.
That new way is described in the change record "hook_module_implements_alter requires the #[LegacyModuleImplementsAlter] attribute", https://www.drupal.org/node/3496788 →
That also links to three other change records:
"Hook implementations can be ordered with an order parameter",
https://www.drupal.org/node/3493962 →
"Reorder hook implementations in other modules with the #[ReOrderHook] attribute",
https://www.drupal.org/node/3497308 →
"Hook implementations can now be removed with a #[RemoveHook] attribute.",
https://www.drupal.org/node/3496786 →
We could link to the one and/or the three. If there is actual API documentation for all of this, the change records should also have links to it and we could link to that directly (as a See also or Related topic?) rather than linking to any change record at all.
Given that comments are apparently, unfortunately, no longer allowed on API documentation pages, it is more important that we include these sorts of pointers in the code that generates the API documentation.
Active
11.0 🔥
documentation