myadmin-plugin-hooks

Register MyAdmin plugin hooks and UI integrations with standardized event mappings.

4|Updated Jul 10, 2017
One-click install
npx skills add https://github.com/myadmin-plugins/maxmind-plugin --skill myadmin-plugin-hooks
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: myadmin-plugin-hooks
Source: https://github.com/myadmin-plugins/maxmind-plugin/tree/main/.claude/skills/myadmin-plugin-hooks
Command: npx skills add https://github.com/myadmin-plugins/maxmind-plugin --skill myadmin-plugin-hooks

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Automates and standardizes how MyAdmin plugins register hooks and admin UI interactions by providing a consistent blueprint for getHooks, getSettings, getRequirements, and getMenu, reducing boilerplate and runtime errors.

Core Features & Use Cases

  • Public static hook handlers with exact signatures to ensure predictable event dispatching.
  • Strict mapping in getHooks() to existing handler methods, preventing broken hooks.
  • gettext-wrapped user-facing strings and safe file/path conventions for settings and requirements.
  • Built-in support for page and function requirements using the Loader, enabling lazy loading of plugin code.
  • ACL-guarded admin menu integration to securely expose new features in the control panel.

Quick Start

Add a new hook to getHooks, implement a public static handler, and register matching getSettings/getRequirements/getMenu logic.

Frequently Asked Questions about myadmin-plugin-hooks

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

FAQPage Schema
How do I register hooks for a PHP admin plugin using Symfony event dispatching?

You register PHP admin plugin hooks by mapping events to public static handler methods within the getHooks function, ensuring strict event-to-method alignment for predictable Symfony event dispatching. This enforces a GenericEvent signature and prevents broken hooks.

How do I add an ACL-guarded admin menu to a MyAdmin plugin?

To add an ACL-guarded admin menu, implement the getMenu function to securely expose new features in the control panel. This standardizes UI integrations and ensures only authorized users can access the extended admin functionality.

How do I lazy load plugin code requirements in a PHP backend?

You lazy load PHP backend plugin code by defining page and function requirements through the Loader within the getRequirements function. This applies safe include-path conventions and enables deferred loading of plugin resources.

What is the standard signature for MyAdmin plugin event handlers?

The standard signature for MyAdmin plugin event handlers is a public static method accepting a GenericEvent object. This enforces predictable event dispatching and standardizes how admin functionality extends the core system.

Why are my MyAdmin plugin hooks returning runtime errors or failing to dispatch?

MyAdmin plugin hooks fail when event-to-method mappings in getHooks do not match existing public static handler signatures. Enforcing precise event-to-method mappings and gettext-wrapped strings prevents these broken hooks and runtime errors.

How do I configure settings with gettext-wrapped strings for a PHP admin panel?

You configure settings by implementing the getSettings function with gettext-wrapped user-facing strings and safe file/path conventions. This standardizes configuration registration and reduces boilerplate across PHP admin panel plugins.