Skip to content

Ensure that AI API Explorer forms can be provided by modules that provide additional functionality.

Paul Smith requested to merge issue/ai-3481156:3481156-ai-api-explorer into 1.0.x

#3481156 This PR :

  1. Provides an interface and Base to be used by all AI API Explorer plugins.
  2. Removes hardcoded routes and menu items for AI API Explorer forms.
  3. Adds a RouteSubscriber and hook_menu_links_discovered_alter implementation to generate routes and menu links for any plugins implementing the new Base.
  4. Adds form that can provide functionality within a given plugin.
  5. Refactors all existing forms to - as much as possible - to generate valid Drupal render arrays to assist developers overriding the forms using hook_form_alter.
  6. Adds methods for plugins to provide a label and description for use in the menu system.
  7. Adds methods for plugins to confirm their dependencies are available.
  8. Adds methods for plugins to confirm the current logged in user can access the form.
  9. Adds a custom access check that uses 7 and 8 to decide if the current user has access to the form's generated route.
  10. Documents the process of creating a new plugin.

Closes #3481156

Edited by Paul Smith

Merge request reports

Loading