Issues (17)

src/views/index.php (1 issue)

1
<?php
2
/**
3
 * @copyright Copyright(c) 2016 Webtools Ltd
4
 * @copyright Copyright(c) 2018 Thamtech, LLC
5
 * @link https://github.com/thamtech/yii2-scheduler
6
 * @license https://opensource.org/licenses/MIT
7
 *
8
 *
9
 * Index View for scheduled tasks
10
 *
11
 * @var \yii\web\View $this
12
 * @var \yii\data\ActiveDataProvider $dataProvider
13
 * @var \thamtech\scheduler\models\SchedulerTask $model
14
 */
15
use yii\helpers\Html;
16
use yii\helpers\Url;
17
use yii\grid\GridView;
18
19
20
$this->title = \thamtech\scheduler\models\SchedulerTask::label(2);
21
$this->params['breadcrumbs'][] = $this->title;
22
?>
23
24
<div class="scheduler-index">
25
26
    <h1><?= $this->title ?></h1>
27
28
    <div class="table-responsive">
29
        <?php \yii\widgets\Pjax::begin(); ?>
30
        <?= GridView::widget([
31
            'layout' => '{summary}{pager}{items}{pager}',
32
            'dataProvider' => $dataProvider,
33
            'pager' => [
34
                'class' => yii\widgets\LinkPager::className(),
0 ignored issues
show
Deprecated Code introduced by
The function yii\base\BaseObject::className() has been deprecated: since 2.0.14. On PHP >=5.5, use `::class` instead. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated  annotation

34
                'class' => /** @scrutinizer ignore-deprecated */ yii\widgets\LinkPager::className(),

This function has been deprecated. The supplier of the function has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.

Loading history...
35
                'firstPageLabel' => Yii::t('app', 'First'),
36
                'lastPageLabel' => Yii::t('app', 'Last'),
37
            ],
38
            'columns' => [
39
                [
40
                    'attribute' => 'name',
41
                    'format' => 'raw',
42
                    'value' => function ($t) {
43
                        return Html::a($t->name, ['view', 'id' => $t->id]);
44
                    }
45
                ],
46
47
                'display_name',
48
                'description',
49
                'schedule',
50
                'status'
51
            ],
52
        ]); ?>
53
        <?php \yii\widgets\Pjax::end(); ?>
54
    </div>
55
</div>
56