Tag::attributeLabels()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 10

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 10
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 12
rs 9.9332
1
<?php
2
/**
3
 * Created for IG Monitoring.
4
 * User: jakim <[email protected]>
5
 * Date: 23.01.2018
6
 */
7
8
namespace app\modules\admin\models;
9
10
11
use app\components\ArrayHelper;
12
13
class Tag extends \app\models\Tag
14
{
15
    public $ts_media;
16
    public $ts_likes;
17
    public $ts_comments;
18
    public $ts_min_likes;
19
    public $ts_max_likes;
20
    public $ts_min_comments;
21
    public $ts_max_comments;
22
    public $ts_created_at;
23
24
    public function scenarios()
25
    {
26
        $scenarios = parent::scenarios();
27
        $scenarios[self::SCENARIO_UPDATE] = [
28
            'is_valid',
29
        ];
30
31
        return $scenarios;
32
    }
33
34
    public function attributeLabels()
35
    {
36
        return ArrayHelper::merge(parent::attributeLabels(), [
37
            'ts_media' => 'Media',
38
            'ts_likes' => 'Likes',
39
            'ts_comments' => 'Comments',
40
            'ts_min_likes' => 'Min Likes',
41
            'ts_max_likes' => 'Max Likes',
42
            'ts_min_comments' => 'Min Comments',
43
            'ts_max_comments' => 'Max Comments',
44
            'ts_created_at' => 'Created At',
45
            'is_valid' => 'Is Valid - an exclamation triangle in the list of tags, is set automatically if the tag is not reachable. Check this option if you are sure that this tag is valid and want to try to refresh stats again.',
46
        ]);
47
    }
48
}