Download the PHP package kadotafig/yii2-startbootstrap-sb-admin-2-asset without Composer
On this page you can find all versions of the php package kadotafig/yii2-startbootstrap-sb-admin-2-asset. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package yii2-startbootstrap-sb-admin-2-asset
yii2-startbootstrap-sb-admin-2-asset
This packages contans an Asset Bundle of Startbootstrap SB Admin 2 for Yii2.
Startbootstrap SB Admin 2 is a responsive Bootstrap 4 created by Start Bootstrap.
Preview
Start Bootstrap was created by and is maintained by David Miller, Owner of Blackrock Digital.
Start Bootstrap is based on the Bootstrap framework created by Mark Otto and Jacob Thorton.
Requirement
This Asset Bundle needs Bootstrap 4. Since Yii2 used Bootstrap 3 by default, you must install and change every Bootstrap 3 Asset to Bootstrap 4. You can read this tutorial to migrate to Yii2 Bootstrap 4 :
- English : How to use a Bootstrap 4 theme with Yii2
- Bahasa Indonesia : Pemrograman Web dengan Yii2 - Menggunakan Bootstrap 4
Installation
The preferred way to install this extension is through composer.
Either run
or add
to the require section of your composer.json
file.
Usage
You can see views-examples folder for example use of this library
Menu Widget
You can use Menu widget in your sidebar. This widget optimize for Startbootstrap SB-Admin 2 template. This widget, like SB-Admin 2, only support 2 level menu.
You can see example use of this widget in views-exampale/views/layout/sidebar.php.
As you can see in above example, this Widget consist of two primary method.
Method | Explanation |
---|---|
options |
Optional method. in this metod you will set any costumization of this Menu widget. It consist of ulClass method and ulId method |
-- ulClass |
Set your <ul> class of this menu. default to "navbar-nav bg-gradient-primary sidebar sidebar-dark accordion" |
-- ulId |
Set your <ul> id of this menu. default to "accordionSidebar" |
items |
Required method. You must set this method in your widget. You can set items inside this method and it will create sub-menu items. Items and Sub Menu Item method use the same method, except for type method. |
-- type |
Optional parameter, there are 3 category in this params. They are menu, divider, and sidebar. Default value of this params are menu |
-- label |
Required parameter. This param will give label to your menu |
-- icon |
Optional parameter. Will use font-awesome icon, so the value of this param will use fa class. Default to fas fa-circle |
-- url |
Required parameter. Use Array value, like array on \yii\helpers\Url::to($array) . If there are items parameter set, url will be ignored |
-- visible |
Optional paremeter. Determined the visibility of menu. Value of visible are boolean. Default to true |
-- linkOptions |
Optional paremeter. This param use array, give any options param to a tag, such as onClick or other options in link. |
Card Widget
You can use card widget. This widget will create bootstrap card, optimize for this template
Example use of card are like below code
As you can see in above example, this Widget consist of some method.
Method | Explanation |
---|---|
type |
Optional method. In this method you set type of your card. This widget support this type of card: cardBorder , ..... Default value of type is cardBorder |
label |
Required method. In this method you set primary label of your card |
sLabel |
Required method. In this method you set secondary label of your card |
icon |
Required method. In this method you set icon of your card |
options |
options method. Set options, available options are colSizeClass , borderColor |
-- colSizeClass |
Set your col-size, value of this method are bootstrap col-size |
-- borderColor |
Set your borderColor, value of this method are bootstrap color |
TODO
Todo Widget
- [x] Menu
- [x] CardBorder
- [x] CardBox
- [ ] HeaderMenu
- [ ] HeaderColor based on Params
- [ ] Etc
Creator
This asset wrapper was created by and is maintained by hoaaah.
All versions of yii2-startbootstrap-sb-admin-2-asset with dependencies
yiisoft/yii2-bootstrap4 Version *
bower-asset/startbootstrap-sb-admin-2 Version ~4.0