PHPackages                             isiikoivan/yii2-eltab-menu - 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. [Framework](/categories/framework)
4. /
5. isiikoivan/yii2-eltab-menu

ActiveYii2-extension[Framework](/categories/framework)

isiikoivan/yii2-eltab-menu
==========================

Advanced multi-pass dynamic tab context active matching highlight system and persistence tracker for Yii2 framework.

00PHP

Since May 28Pushed 1w agoCompare

[ Source](https://github.com/isiikoivan/yii2-eltab-menu)[ Packagist](https://packagist.org/packages/isiikoivan/yii2-eltab-menu)[ RSS](/packages/isiikoivan-yii2-eltab-menu/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependenciesVersions (2)Used By (0)

```
# Yii2 Eltabs Dynamic Menu & Contextual State Tracker

`yii2-eltab-menu` is a highly optimized, decoupled layout extension designed to isolate context sub-menus, tab matrices, and complex active tracking loops from view template files.

By integrating a centralized configuration registry with a high-priority **Two-Pass Execution Engine**, this package automatically maintains active sub-navigation highlight states across intricate workflows (such as deep CRUD record creation, updates, multi-action tabs, and module cross-context jumps) while completely avoiding state-bleeding or false positives.

---

## Key Features

* **Decoupled Architecture:** Strips raw visual list tags, routing links, RBAC permissions checks, and tracking logic out of your layout files and into a clean, centralized data dictionary.
* **Two-Pass Matching Engine:** Guarantees a strict single-active-tab limit by resolving direct explicit URL hits completely before executing fallback matching algorithms.
* **State Persistence Safety Net:** Uses HTTP Referrer checks combined with active query parameter address string scanning to prevent tabs from losing active focus during browser refreshes (F5), deep-linking, or bookmarked browser navigation history.
* **Dynamic Reflection Fallback:** Bypasses manual string-matching configurations by dynamically scanning controller methods for matching inline/external actions when explicit rules aren't specified.
* **Cross-PHP Version Compatibility:** Hand-crafted using legacy-safe fallback checks to execute flawlessly on environments ranging from legacy **PHP 5.6** all the way to modern **PHP 8.x**.

---

## Installation

The preferred way to install this extension is through [Composer](http://getcomposer.org/download/).

Run the following command in your terminal:

```bash
composer require isiikoivan/yii2-eltab-menu
```

or add this line directly to the `require` block of your application's `composer.json` file:

```
"isiikoivan/yii2-eltab-menu": "~1.0.0"
```

---

Component Architecture Implementation
-------------------------------------

[](#component-architecture-implementation)

### 1. The Data Hub Configuration (`EltabsMenuRegistry.php`)

[](#1-the-data-hub-configuration-eltabsmenuregistryphp)

Create a custom menu registry utility inside your application (e.g., in `app\components`) to house your layout configurations. Group them under array indices matching the target runtime `Yii::$app->controller->id`.

```
