magicsoft / yii2-modal
Magic Modal
Installs: 44
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Language:JavaScript
Requires
This package is auto-updated.
Last update: 2025-04-11 03:34:57 UTC
README
Magic Modal
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist magicsoft/yii2-modal "*"
or add
"magicsoft/yii2-modal": "*"
to the require section of your composer.json
file.
Usage
Once the extension is installed, simply use it in your code by :
You can use this modal by attributes:
<?php Html::a( '<span class="glyphicon glyphicon-plus"></span> Create', ['country/create'], [ 'class' => 'magic-modal btn btn-success', 'ajaxOptions' => '{"confirmToLoad":true,"confirmToSend":true"confirmToClose":true}', 'jsFunctions' => '' ] ) //ajaxOptions and jsFunctions are optional. ?>
##Register assets In your main: register
<?php use magicsoft\modal\MagicModalAsset; MagicModalAsset::register($this);
Or you can use this modal by js: myModal = new MagicModal(url, ajaxOptions, jsFunctions, 'myModal')