Completed
Push — master ( e27df9...80d01c )
by Andrii
48:30 queued 33:30
created

TicketGridLegend::items()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 15

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 15
rs 9.7666
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
4
namespace hipanel\modules\ticket\grid;
5
6
7
use hipanel\modules\ticket\models\Thread;
8
use hipanel\widgets\gridLegend\BaseGridLegend;
9
use hipanel\widgets\gridLegend\GridLegendInterface;
10
use Yii;
11
12
/**
13
 * Class TicketGridLegend
14
 * @package hipanel\modules\ticket\grid
15
 *
16
 * @property Thread $model
17
 */
18
class TicketGridLegend extends BaseGridLegend implements GridLegendInterface
19
{
20
    public function items()
21
    {
22
        return [
23
            [
24
                'label' => Yii::t('hipanel:ticket', 'You assigned'),
25
                'color' => '#98FB98',
26
                'rule' => $this->model->isUserAssigned(),
27
            ],
28
            [
29
                'label' => Yii::t('hipanel:ticket', 'Priority'),
30
                'color' => '#F2DEDE',
31
                'rule' => $this->model->isHighPriority(),
32
            ],
33
        ];
34
    }
35
}
36