Download the PHP package sjaakp/yii2-bandoneon without Composer

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

Bandoneon 2.0

Lightweight accordion widget for Yii2

Latest Stable Version Total Downloads License

Motivation

In my opinion, there are some issues with the standard Yii2 JUI Accordion widget.

Bandoneon is a lightweight, versatile replacement widget for the JUI Accordion. The Javascript is less than 1400 bytes. It has no dependencies at all, so it could be used on jQuery-less pages.

Here are some demo's of the Bandoneon widget.

Installation

The preferred way to install Bandoneon is through Composer. Either add the following to the require section of your composer.json file:

"sjaakp/yii2-bandoneon": "*"

Or run:

composer require sjaakp/yii2-bandoneon "*"

You can manually install Bandoneon by downloading the source in ZIP-format.

Usage

Use Bandoneon by enclosing the sections in straight HTML between calls to Bandoneon::begin() and Bandoneon::end(), like so:

    <h4>Heading 1</h4>
    <div>Lorem ipsum ... felis ultricies.</div>

    <h4>Heading 2</h4>
    <div>Pellentesque aliquet ... placerat tincidunt.</div>

        ...

    <h4>Heading n</h4>
    <div>Curabitur sit ... gravida nec turpis.</div>

You can use any sensible HTML tags for the headings and the sections. For instance, this works just as well:

    <p>Heading 1</p>
    <p>Lorem ipsum ... felis ultricies.</p>

    <p>Heading 2</p>
    <p>Pellentesque aliquet ... placerat tincidunt.</p>

        ...

    <p>Heading n</p>
    <p>Curabitur sit ... gravida nec turpis.</p>

Bandoneon makes no assumptions about the HTML of the headings and the sections. It uses the CSS selectors for odd and even elements to differentiate between them. The HTML in the sections, and in the headings as well, can be as convoluted as you like.

Initially open

If you want a section to be initially open, just add the class "open" to its heading, like so:

    ...
    <h4 class="open">Heading 2</h4>
    <div>This section will be initially open...</div>
    ...

Surrounding element

By default, Bandoneon creates a <div> as surrounding element. You can modify this by setting the 'tag' option in Bandoneon::begin().

This may come in handy if you want to create a Bandoneon, based on a HTML definition list <dl>:

    <dt>Heading 1</dt>
    <dd>Lorem ipsum ... felis ultricies.</dd>

    <dt>Heading 2</dt>
    <dd>Pellentesque aliquet ... placerat tincidunt.</dd>

        ...

    <dt>Heading n</dt>
    <dd>Curabitur sit ... gravida nec turpis.</dd>

Options

Bandoneon has two client options:

A very slow Bandoneon might be coded like this:

    <h4>Heading 1</h4>
    <div>Lorem ipsum ... felis ultricies.</div>

    ...

Building bandoneon.js

Be sure that npm is installed.

Run npm install.

Run rollup -c.


All versions of yii2-bandoneon with dependencies

PHP Build Version
Package Version
Requires yiisoft/yii2 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 sjaakp/yii2-bandoneon contains the following files

Loading the files please wait ....