ACL-aware navigation trees for Mezzio, driven by Route::setOptions().
| Document | Contents |
|---|---|
| Overview | Goals, quick start, route options reference |
| Architecture | Design decisions and rationale |
| Component Reference | API docs for every class |
| Extending | Custom renderers, replacing the factory |
| Testing | Unit test examples and guidance |
Private package - not published to Packagist. Consume via a VCS repository entry:
{
"repositories": [
{ "type": "vcs", "url": "https://github.com/webinertia/webware-navigation" }
],
"require": {
"webware/webware-navigation": "1.0.x-dev"
}
}After each change run composer update webware/webware-navigation (the lock
pins the commit hash).
Note: the package types against Webware\Core\AclInterface and
Webware\Core\UserInterface, both provided by webware/webware-core, which this
package requires.
Add to config/config.php:
Webware\Navigation\ConfigProvider::class,That registers the middleware factory and the navigation view helper. The
middleware itself is not piped for you: add it to config/pipeline.php
after RouteMiddleware and before DispatchMiddleware, so that RouteResult
is on the request by the time it runs:
$app->pipe(RouteMiddleware::class);
// ...
$app->pipe(UrlHelperMiddleware::class);
$app->pipe(NavigationMiddleware::class);
$app->pipe(DispatchMiddleware::class);The package deliberately does not self-register through Mezzio's
middleware_pipeline config. That mechanism orders middleware by an integer
priority, and this middleware's correctness depends on running after
RouteMiddleware and before DispatchMiddleware, an ordering such a priority
cannot express safely. See Architecture, Decision 7.
Package: webware/webware-navigation
Namespace: Webware\Navigation\