mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-08 17:07:33 +08:00
allows for configuration of the default buttons like this:
```php
[
'class' => ActionColumn::className(),
'template' => '<div class="btn-group text-center">{view} {update} {delete}</div>',
'buttonOptions' => [
'class' => 'btn btn-default btn-xs',
],
],
```
close #7633
This folder contains official Yii 2 extensions.
To add a new extension named xyz (must be in lower case), take the following steps:
- create a folder named
xyzunderyiiand put all relevant source code there; - create the following accessory files (please refer to any existing extension):
composer.jsonREADME.mdCHANGELOG.mdLICENSE.md
- ask Qiang to create a subsplit for
xyzand a composer package namedyii2-xyz; - If an extension depends on external bower/npm packages:
- in the
composer.jsonfile of the extension, list the dependencies in the format of'bower-asset/PackageName': '1.1'; - create an asset bundle class to list the needed js/css files from the package. The
sourcePathproperty of the bundle should point to the distribution path of the package, such as@bower/PackageName, or@bower/PackageName/dist.
- in the
- modify
/composer.jsonand addyiisoft/yii2-xyzto thereplacesection. Also add any bower/npm dependencies to therequiresection.