panix/wgt-callback

Widget callback

1.0.0 2021-10-16 09:44 UTC

This package is auto-updated.

Last update: 2024-11-11 14:24:52 UTC


README

Latest Stable Version Total Downloads Monthly Downloads Daily Downloads Latest Unstable Version License

Installation

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.

Usage

add you config.php

'controllerMap' => [
    'callback' => 'panix\ext\callback\CallbackController',
],

add you view file

See modal options.

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',
    // ..
]