Download the PHP package anroots/menu without Composer

On this page you can find all versions of the php package anroots/menu. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package menu

HTML Navigation Module for Kohana 3.3

Simplify rendering, building and maintenance of simple, dynamic standardised navigation menus. Instead of...

... we do this:

Basics

You define your menus in Kohana configuration files (see config/menu/navbar.php). Then, in your (main) controller (or template), you construct a new Menu object, set the active link and render it in your template. Done.

Example use case

A WordPress type blog might have...

Normally, you'd build HTML views with ul and li elements and then write some PHP to highlight the active link. This is difficult to maintain (DRY) and too much hassle (not to mention ugly).

Instead, describe your (standardised) menus in configuration files and have Kohana do the heavy lifting.

Installation

Place the files in your modules directory.

As a Git submodule:

As a Composer dependency

Copy MODPATH.menu/config/menu/navbar.php into APPPATH/config/menu/navbar.php and customize

Activate the module in bootstrap.php.

Echo menu output in your template

You might wish to instantiate the menu in your main controller, since this gives you a way to interact with the Menu object before it's rendered.

Config files

You can use different config files by setting the factory's $config parameter.

The view key of the config files sets the view file that will be used to render the menu. It defaults to a view file based on the $config parameter: /views/templates/menu/$config and if that does not exist falls back on the included /views/templates/menu/default view file. For an example, see the included navbar.php config file.

Example: Load menu configuration based on user role

Marking the current menu item

Use set_current() to mark the current menu item in your controller

The parameter of set_current() is the URL value of the respective item or its (numeric) array key

Documentation

The code is mostly commented and more help can be found on the Wiki.

Licence

The Kohana module started out as a fork of the original Kohana Menu module by Bastian Bräu, but is now independently developed under the MIT licence.


All versions of menu with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.0
composer/installers Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package anroots/menu contains the following files

Loading the files please wait ....