Skip to content
Snippets Groups Projects
Forked from project / jsonapi_menu_items
1 commit ahead of the upstream repository.
user avatar
Issue #3447727: Add JSON API Menu Tree submodule with resource for hierarchical menu structure
Camilo Ernesto Escobar Bedoya authored
ae18af18
History

JSON API Menu items

CircleCI

Adds a JSON API resource for menu items: /jsonapi/menu_items/{menu}

Features

  • Supports user and system created menu items.
  • Supports menu_link_content and menu_link_config menu items.
  • Supports filtering by depth, parents and custom query conditions.
  • Support for JSON:API Hypermedia based links in /jsonapi root document.
  • Support for fields added to menu links via Menu Item Extras.

Filters

  • min_depth

    Sets the minimum depth of menu links in the resulting tree relative to the root.

    Example: ?filter[min_depth]=2

  • max_depth

    Sets the maximum depth of menu links in the resulting tree relative to the root.

    Example: ?filter[max_depth]=2

  • parent

    Sets a root for menu tree loading.

    Example: ?filter[parent]=system.admin

  • parents

    Adds parent menu links IDs to restrict the tree.

    Example: ?filter[parents]=system.admin,system.admin_structure

  • conditions[]

    Adds a custom query condition.

    Example: ?filter[conditions][provider][value]=system