Download the PHP package camurphy/bootstrap-menu-bundle without Composer

On this page you can find all versions of the php package camurphy/bootstrap-menu-bundle. 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 bootstrap-menu-bundle

Bootstrap Menu Bundle

CircleCI

A simple Symfony bundle for defining your application's menus in configuration and rendering them to work with Bootstrap's Navbar component. This bundle supports Bootstrap versions 4 and 5.

Installation

Usage

Your menus are defined in config/packages/bootstrap_menu.yaml.

Below is a very simple menu called main with only a single 'Logout' link.

Then within your template you can render your menu in a Navbar by passing the name of your menu to render_bootstrap_menu. This markup is taken from the Bootstrap Navbar Fixed example. The Bootstrap 4 version is here

Result:

Example 1

Route parameters

Perhaps your route requires parameters. You can also specify these.

External URL

If you would instead like to link to an absolute URL, use url instead.

Dropdowns

Simply by specifying items instead of a route or url to link to, your menu item becomes a Dropdown. Here's an example where a 'Change Password' and a 'Logout' link are nested below an 'Account' dropdown.

Result:

Example 2

Dividers

Dropdowns can also contain Dividers to separate groups of related menu items.

Result:

Example 3

Headers

Dividers that also contain a label become Headers.

Result:

Example 4

Security

Certain parts of the menu may be locked down by role. This following example only allows administrators to change their password.

For a user without ROLE_ADMINISTRATOR they would see:

Example 5

The reason for this is Bootstrap Menu Bundle intelligently prunes Dropdowns to remove unnecessary Dividers. Because the user is not permitted to see any items between 'Password Stuff' and 'Other Stuff', the 'Password Stuff' Divider is also pruned.

Security can also be configured at a Dropdown level. Perhaps only administrators are allowed to use the 'Users' menu.

Negating roles

You may also hide menu items from users that have a certain role by prefixing the role with an exclamation mark. This will take precedence over included roles. In the example below, if they have both ROLE_SUPPORT and ROLE_USER they will not see the menu item.

Active styles

Out of the box, top level menu items are given the active class when the current route matches the menu item's route. In this example we're on the 'Reports' page.

Example 6

Dropdown active styles

It's not documented, but the active class also works on dropdowns and dropdown items. To enable for dropdowns, set dropdown_active_style to true in the config.

Example 7

To enable for dropdown items, set dropdown_item_active_style to true.

Example 8


All versions of bootstrap-menu-bundle with dependencies

PHP Build Version
Package Version
Requires php Version ^7.1.3 || ^8.0
ext-json Version *
symfony/config Version ^4.2|^5.0|^6.0|^7.0
symfony/dependency-injection Version ^4.2|^5.0|^6.0|^7.0
symfony/security-bundle Version ^4.2|^5.0|^6.0|^7.0
symfony/twig-bundle Version ^4.2|^5.0|^6.0|^7.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 camurphy/bootstrap-menu-bundle contains the following files

Loading the files please wait ...