PHPackages                             hypejunction/menus\_api - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. hypejunction/menus\_api

ActiveElgg-plugin

hypejunction/menus\_api
=======================

Menus API

1.1.1(10y ago)0661GPL-2.0PHP

Since Jan 21Pushed 10y ago1 watchersCompare

[ Source](https://github.com/hypeJunction/Elgg-menus_api)[ Packagist](https://packagist.org/packages/hypejunction/menus_api)[ Docs](http://hypejunction.com)[ RSS](/packages/hypejunction-menus-api/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (4)Dependencies (1)Versions (5)Used By (0)

Menus API
=========

[](#menus-api)

[![Elgg 2.0](https://camo.githubusercontent.com/981b94044a74b931be93e2825c7151896de9c8a53ccb960daf01b8fe0d800774/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f456c67672d322e302e782d6f72616e67652e7376673f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/981b94044a74b931be93e2825c7151896de9c8a53ccb960daf01b8fe0d800774/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f456c67672d322e302e782d6f72616e67652e7376673f7374796c653d666c61742d737175617265)

Various convenient functions and views for working with menus

[![Title Menu](https://camo.githubusercontent.com/f6679e47642dbaa092e98bd5a0474d54ff0c110029c8fb6804d9b1135f76e8c7/68747470733a2f2f7261772e6769746875622e636f6d2f687970654a756e6374696f6e2f456c67672d6d656e75735f6170692f6d61737465722f73637265656e73686f74732f7469746c652e706e67 "Sample Title Menu")](https://camo.githubusercontent.com/f6679e47642dbaa092e98bd5a0474d54ff0c110029c8fb6804d9b1135f76e8c7/68747470733a2f2f7261772e6769746875622e636f6d2f687970654a756e6374696f6e2f456c67672d6d656e75735f6170692f6d61737465722f73637265656e73686f74732f7469746c652e706e67)

Usage
-----

[](#usage)

### Combine menus

[](#combine-menus)

```
$menu_items = menus_api_combine_menus([
    'entity',
    'owner_block',
    'user_hover'
], [
    'entity' => $user,
]);
```

### Get menu items

[](#get-menu-items)

```
$params = menus_api_prepare_params('user_hover', ['entity' => 'user]);
$items = menus_api_get_menu('user_hover', $params);
```

### Add icon and indicator

[](#add-icon-and-indicator)

```
$item = ElggMenuItem::factory([
    'name' => 'messages',
    'text' => 'New messages',
    'href' => '/messages',
    'data' => [
        'indicator' => 5,
        'icon' => 'envelope',
        'require' => ['js/menu/module'],
    ]
]);
```

### Only show certain menu sections

[](#only-show-certain-menu-sections)

```
echo menus_api_view_menu('user_hover', [
    'entity' => $user,
    'sections' => ['admin', 'action'],
    'sort_by' => 'priority',
]);
```

### Child menu subsections

[](#child-menu-subsections)

You can break down child menus into subsections, and list them in a predefined order.

```
$parent = ElggMenuItem::factory([
	'name' => 'parent',
	'text' => 'Parent',
	'data' => [
		'subsections' => ['actions', 'admin']
	]
]);

$item = ElggMenuItem::factory([
	'name' => 'action',
	'parent_name' => 'parent',
	'text' => 'Action',
	'data' => [
		'subsection' => 'actions'
	]
]);
```

Note
----

[](#note)

- This plugin replaces the default menu, section and item views

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~6 days

Total

4

Last Release

3741d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5071b1cd852e094b3f564962a625e04c227adc73af30c5b46b243ab8f20154a7?d=identicon)[hypeJunction](/maintainers/hypeJunction)

---

Top Contributors

[![hypeJunction](https://avatars.githubusercontent.com/u/1202761?v=4)](https://github.com/hypeJunction "hypeJunction (14 commits)")

---

Tags

pluginelggmenus

### Embed Badge

![Health badge](/badges/hypejunction-menus-api/health.svg)

```
[![Health](https://phpackages.com/badges/hypejunction-menus-api/health.svg)](https://phpackages.com/packages/hypejunction-menus-api)
```

###  Alternatives

[coldtrick/group_tools

Combines different group additions into one plugin

305.1k](/packages/coldtrick-group-tools)[coldtrick/profile_manager

Improved management of user and group profile fields

293.7k1](/packages/coldtrick-profile-manager)[coldtrick/widget_manager

Manage your widgets

214.3k](/packages/coldtrick-widget-manager)[coldtrick/thewire_tools

Extend the functionality of The Wire

133.2k](/packages/coldtrick-thewire-tools)[coldtrick/translation_editor

Provide an easy way to edit translations

113.4k1](/packages/coldtrick-translation-editor)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
