StatusAction is a widget for working with the statuses.
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist rokorolov/yii2-statusaction-widget "*"
or add
"rokorolov/yii2-statusaction-widget": "*"
to the require section of your composer.json
file.
Once the extension is installed, simply use it in your code by :
use rokorolov\statusaction\StatusAction;
<?= StatusAction::widget([
'key' => $key, // the key associated with the data model
'status' => $status, // current status
'buttons' => [] // array, list of items
]); ?>
Comments