menus

Manages OrangeHRM navigation menus via MenuItem entities, MenuService rendering, and MenuConfigurator hooks.

Updated Jul 23, 2026
One-click install
npx skills add https://github.com/snow-gift111/orangehrm-ai-sdlc-capstone --skill menus-snow-gift111
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: menus
Source: https://github.com/snow-gift111/orangehrm-ai-sdlc-capstone/tree/main/.agents/skills/menus
Command: npx skills add https://github.com/snow-gift111/orangehrm-ai-sdlc-capstone --skill menus-snow-gift111

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Adding a new page to OrangeHRM is not enough — it must also appear in the side panel or top menu, highlight correctly when active, and respect role-based permissions. This Skill explains how the menu system works end-to-end so new entries show up, highlight properly, and stay hidden from unauthorized users. ## Core Features & Use Cases - MenuItem entity model: Understand the ohrm_menu_item table — hierarchy via parent_id and level, ordering via order_hint, visibility via status, and screen linkage via screen_id. - Rendering pipeline: Learn how MenuService::getMenuItems() computes menus server-side, caches them, filters by screen permissions, and passes JSON to the Vue <oxd-layout> component. - MenuConfigurator hooks: Write per-screen configurators to override which menu item highlights on add/edit or polymorphic pages. - Use Case: You built a new "Widget List" admin page but it does not appear in the navigation. Use this Skill to seed the screen, permissions, and menu item in a migration, then clear the cache so it renders. ## Quick Start Ask the agent to add a menu entry for a new OrangeHRM admin page and explain why it is not appearing yet.

Frequently Asked Questions about menus

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a menu item for a new OrangeHRM page?

Seed three rows in a migration in order: the Screen row in ohrm_screen, the role permission in ohrm_user_role_screen, then the MenuItem in ohrm_menu_item with parent_id, level, order_hint, and status. Run bin/console cache:clear afterward so existing instances pick up the change.

Why does my new OrangeHRM menu item not appear?

The most common causes are a stale menu cache (run bin/console cache:clear), a missing ohrm_user_role_screen permission row for the user's role, status set to false, or an incorrect level/parent_id combination. Also verify the linked screen row exists.

What is a MenuConfigurator in OrangeHRM and when should I write one?

A MenuConfigurator is a class implementing the MenuConfigurator interface, referenced by the Screen.menu_configurator column, that overrides which menu item highlights as active. Write one for add/edit screens that should highlight their parent list page, or polymorphic pages whose highlight depends on context.

How does OrangeHRM decide which menu items a user can see?

MenuService filters cached menu items per request: an item linked to a screen shows only if the user's roles have can_read permission in ohrm_user_role_screen and the item's status is true. Group-only items with screen=NULL show only if they have visible children.

What happens to menu items when an OrangeHRM module is disabled?

A ModuleStatusChange event fires and plugin subscribers call MenuService::enableModuleMenuItems(), which flips the related menu items' status to false and invalidates the cache. The screens remain reachable by URL but disappear from navigation.