Download the PHP package rnr1721/le7-menu-builder without Composer

On this page you can find all versions of the php package rnr1721/le7-menu-builder. 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 le7-menu-builder

le7-menu-builder

HTML menu builder for le7 PHP MVC framework or any PHP 8 project

The PHP Menu Manager is a flexible and customizable class that allows you to create, manage, and render menus in your PHP applications. It provides functionality to add, remove, and modify menu items, as well as rendering the menu in various formats.

Key Features:

The Menu Manager class is designed to be simple to use and extend. It uses an array-based data structure to represent menus and provides methods to manipulate and render the menus.

Install

Testing

Basic usage

Multiple different menus in one instance of MenuBuilder

You can build and render different menus in one instance. When you create instance of MenuBuilder, it will create default menu named 'default'. But you can easy create another and make it active. Example:

'Variables' in links (Templated links)

In some cases, you may need to store variables in links, not full URL

Now, if you export your menu, {url} will be replaced to https://example.com IMPORTANT: it will not work with raw links added by addRawItem method

Raw links

This project use this implementation of PSR LinkInterface: https://github.com/rnr1721/le7-links This implementation of both PSR LinkInterface and UriInterface, but contain own methods, such as render, getAnchor, withAnchor etc...

Renderer options

Any MenuRenderer have own set of settings as array. You can see default settings and change them when render. Example for bootstrap renderer:

Of course, you can change this options:

IMPORTANT: not necessary to set all options, you can change only that you need to change. Also, you can not change data type of option, it will call exception. Every renderer can have own list of options or dont have them.

Cache options

You can cache the menu render result.

Renderers

These renderers are available now, but you can write own renderer that implements MenuRendererInterface. Now out-of-the-box available this renderers:

MenuRendererInterface:

You can customize the rendering of the menu by providing your own rendering engine or modifying the default one. Additionally, caching can be enabled to improve performance when rendering menus.

Import and export menu items configuration

You can import and export menu items configuration.

Example:

Another example of usage


All versions of le7-menu-builder with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
rnr1721/le7-links Version ^1.0
psr/simple-cache Version ^3.0
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 rnr1721/le7-menu-builder contains the following files

Loading the files please wait ...