PHP code example of magicalella / yii2-backgroundtask
1. Go to this page and download the library: Download magicalella/yii2-backgroundtask library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
magicalella / yii2-backgroundtask example snippets
echo BackgroundTaskWidget::widget([
'task' => 'export_csv_articoli',//action in controller console ex: export_csv_articoli
'button_class' => '', //class button default is 'btn btn-success'
'title' => '', //title button default is Yii::t('app','Add Task')
'button_text' => '', //text button default is Yii::t('app','Add Task')
'params' => [
'qs' => Yii::$app->request->queryParams
] //array parmas for action task in controller console BackgroundTask exemple params for query search export model
]);