Skip to content
This repository was archived by the owner on Sep 19, 2023. It is now read-only.

Commit 1497566

Browse files
committed
Updated readme about bs4 theme support
1 parent cee0c2a commit 1497566

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
CHANGELOG
22
=====================
33

4+
v1.2
5+
---------------------
6+
* NEW: Bootstrap4 Themes support.
7+
48
v1.1.3
59
---------------------
610
* Bugfix: Compatibility with Adminlte v2.6.0 (conflict of $.fn.tree plugin name). @ap

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,30 @@ To use the RBAC extension, you need to configure the components array in your ap
9292
],
9393
```
9494

95+
##### Bootstrap4 Themes Support
96+
97+
By default all views use standard yii2-bootstrap package with Boostrap v3.
98+
If you use modern Bootstrap 4, then you can overwrite some classes to use yii2-bootstrap4
99+
package instead. Inside your configuration you need to reconfigure container dependencies like
100+
this:
101+
102+
```php
103+
'container' => [
104+
'definitions' => [
105+
// you can create your own GrivView to customize all options for main roles and permissions lists.
106+
'justcoded\yii2\rbac\widgets\RbacGridView' => [
107+
'class' => \app\modules\admin\widgets\RbacGridView::class,
108+
],
109+
// this will replace bootstrap3 ActiveForm with bootstrap4 ActiveForm.
110+
'justcoded\yii2\rbac\widgets\RbacActiveForm' => [
111+
'class' => \yii\bootstrap4\ActiveForm::class,
112+
],
113+
],
114+
],
115+
```
116+
117+
* Note: you need to add `yiisoft/yii2-bootstrap4` package dependency manually in your `composer.json`.
118+
95119
#### Basic RBAC configuration
96120

97121
Please follow [oficial documentation](http://www.yiiframework.com/doc-2.0/guide-security-authorization.html#configuring-rbac)

0 commit comments

Comments
 (0)