dev-master
9999999-devyii2 widgets alert
MIT
The Requires
extension yii2 alert
yii2 widgets alert
The extends class for all widgets classes on views, (*1)
The preferred way to install this extension is through composer., (*2)
Either run, (*3)
php composer.phar require --prefer-dist prawee/yii2-widgets "dev-master"
or add, (*4)
"prawee/yii2-widgets": "dev-master"
to the require section of your composer.json
file., (*5)
use prawee\widgets\ButtonAjax; use yii\bootstrap\Modal; echo ButtonAjax::widget([ 'name'=>'Create', 'route'=>['create'], 'modalId'=>'#main-modal', 'modalContent'=>'#main-content-modal', 'options'=>[ 'class'=>'btn btn-success', 'title'=>'Button for create application', ] ]); ... Modal::begin(['id'=>'main-modal']); echo ' '; Modal::end();
public functionn actionCreate(){ ... if(Yii::$app->getRequest()->isAjax){ return $this->renderAjax('create', [ 'model' => $model, ]); }else{ return $this->render('create', [ 'model' => $model, ]); } }
yii2 widgets alert
MIT
extension yii2 alert