Download the PHP package buttflattery/yii2-multimenu without Composer

On this page you can find all versions of the php package buttflattery/yii2-multimenu. 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 yii2-multimenu

Yii2-multimenu V 1.0.0

What is this repository for?

A Yii2 widget that creates a navigation menu based on the yii\widgets\Menu, and provides you with multiple layout options that include a Big Drop style top navigation, a Left Menu navigation and a Sticky drop-up footer menu just by using this single widget. it uses multilple 3rd party plugins for animating the menu. It provide an extra helper component to build menu from the model.

preview

External Libraries Used


About Bootstrap Version Usage

The extension detects if you are using the yiisoft/yii2-bootstrap or yiisoft/yii2-bootstrap4 and loads the appropriate assets for the extension. It will check first the "yiisoft/yii2-bootstrap4" if it exists then it will load bootstrap4 resources otherwise it will fall back to use bootstrap3. So make sure you are following the correct guide to use the yiisoft/yii2-bootstrap4" and remove the "yiisoft/yii2-bootstrap": "~2.0.0", from you composer.json and change the minimum-stability:"dev" here is the complete guide.

How do I set up the package

use composer to install the extension

or add into the composer.json file under require section

Demos

Usage

Available Options for the Widget

You can use the available default options for the yii\widgets\Menu along with the following options

$brandImage (string|bool)

Src of the brand image or false if it's not used. Note that this param will override $this->brandLabel param. Default value is false.

$brandLabel (string|bool)

The text of the brand or false if it's not used. Note that this is not HTML-encoded. Default value is false.

$brandOptions (array)

The HTML attributes of the brand link. \yii\helpers\Html::renderTagAttributes() for details on how attributes are being rendered.

$brandUrl (bool)

The URL for the brand's hyperlink tag. This parameter will be processed by [[\yii\helpers\Url::to()]] and will be used for the "href" attribute of the brand link. Default value is false that means [[\yii\web\Application::homeUrl]] will be used. You may set it to null if you want to have no link at all.

$containerCssClasses (array)

The Container HTML options.

$layoutTemplate (string)

The layout template used to draw the menu and rearrange the brand and menu items placement. Default value is {brand}{multimenu}.

$enableIcons (bool)

If default icon should be enabled along with the labels of the menu. It uses the Multmenu::DEFAULT_ICON which has the value <i class="ion-android-menu"></i>

$multimenuOptions (array)

You can pass the plugin specific settings here for the multimenu and settings depending on the type of the menu you are using.

There are menu/theme specific options that are applicable to specific menu types only. See details below.

Remember when using any on the following menus if you are providing the items array manually, when specifying label for the submenus that further opens a menu you should not leave the url blank but javascript::void(0) as in the examples below.

BigDrop minimal options with brand text

The bigdrop menu uses normal dropdowns for the first 2 levels/childs,

which means you need to have 3 or more levels/childs to activate the bigdrop menu, and will support to infinite levels. See below code for $items list.

Leftnav Minimal options with brand image

Dropup menu with custom color theme Asset Class

Your theme asset class code

Menu items from Database

A helper component buttflattery\multimenu\helpers\MenuHelper is added that comes in handy if you want to just add all the menu items in the database table and leave the rest on this component to generate the items array for the menu.

If you dont have a menu table added yet you can run the migration and use the model provided buttflattery\multimenu\models\Menu.

Running migrations

Run the following command on terminal to run the migrations

php ./yii migrate/up --migrationPath=@vendor/buttflattery/yii2-multimenu/src/migrations

Configure the MenuHelper Component

Open config/web.php if you are using yii2-basic or the common/config/main.php if you are using advance-app and add the following under the components array.

If you wish to use your custom model and have a menu table already you can provide your own model namespace and set the field names appropriately for the component to work correctly. See below for a full set of options you can configure for the component.

Adding the items for the menu in table

When adding the menu items in the database keep in mind the following things

See the sample values below

Now you can call the function getMenuItems(orderByField) to get the $items array like below.

Available Constants

Who do I talk to?


All versions of yii2-multimenu with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.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 buttflattery/yii2-multimenu contains the following files

Loading the files please wait ....