1. Go to this page and download the library: Download sjaakp/yii2-collapse library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
sjaakp / yii2-collapse example snippets
use sjaakp\collapse\Collapse;
Collapse::begin('Details')
Collapse::end()
use sjaakp\collapse\Collapse;
Collapse::begin([
'label' => 'Details',
'options' => [ 'class' => 'bg-info' ], // give the panel an extra class
'open' => true // initially open the panel
])
Collapse::end()
use sjaakp\collapse\CollapseGroup;
CollapseGroup::begin([/* options */])
CollapseGroup::beginCollapse('Details)
CollapseGroup::endCollapse()
CollapseGroup::beginCollapse('More details)
CollapseGroup::endCollapse()
CollapseGroup::end()
use sjaakp\collapse\Accordion;
Accordion::begin('Details')
Accordion::next('More details')
Accordion::next('Even more details')
Accordion::end()
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.