Issue #3615510: Add an alter hook and events API with myrest.api.php

Adds myrest.api.php documenting the alter hook and both events, and states the boundary: what is documented there is supported, everything else is @internal.

hook_myrest_structure_alter() now exists and fires from MyrestHelper::getStructureByParagraph(). It is invoked for empty structures too, which is the case that makes it useful - a paragraph bundle the module has no builder for currently produces nothing, and a site can now answer for its own paragraph types without patching the module. The context carries the bundle name myrest knows, not the site's, which matters once a bundle mapping exists.

Co-Authored-By: Claude Opus 5 noreply@anthropic.com

Closes #3615510

Merge request reports

Loading