The preferred way to install this extension is through composer.
Either run
php composer require --prefer-dist panix/wgt-callback "*"
or add
"panix/wgt-callback": "*"
to the require section of your composer.json
file.
add you config.php
'controllerMap' => [
'callback' => 'panix\ext\callback\CallbackController',
],
add you view file
echo \panix\ext\callback\CallbackWidget::widget([
'id' => 'callback-modal',
'size' => 'modal-dialog-centered modal-dialog-scrollable',
'toggleButton' => false,
// modal options
]);
echo Html::button('Callback', ['data-toggle' => 'modal','data-target' => '#callback-modal']);
Add you UrlManager rules
'rules' => [
'callback' => 'callback/index',
// ..
]