for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* @copyright Copyright(c) 2016 Webtools Ltd
* @copyright Copyright(c) 2018 Thamtech, LLC
* @link https://github.com/thamtech/yii2-scheduler
* @license https://opensource.org/licenses/MIT
**/
namespace thamtech\scheduler\actions;
use Yii;
use yii\base\Action;
use thamtech\scheduler\models\SchedulerTask;
* List the task instances that have been established in the database.
*/
class IndexAction extends Action
{
* @var string the view file to be rendered. If not set, it will take the value of [[id]].
* That means, if you name the action as "index" in "SchedulerController", then the view name
* would be "index", and the corresponding view file would be "views/scheduler/index.php".
public $view;
* Runs the action
*
* @return string result content
public function run()
$model = new SchedulerTask();
$dataProvider = $model->search($_GET);
return $this->controller->render($this->view ?: $this->id, [
'dataProvider' => $dataProvider,
'model' => $model,
]);
}