BannerTranslation::tableName()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
/**
3
 * @link https://github.com/yiimaker/yii2-banner
4
 * @copyright Copyright (c) 2017 Yii Maker
5
 * @license BSD 3-Clause License
6
 */
7
8
namespace ymaker\banner\common\models\entities;
9
10
use yii\db\ActiveRecord;
11
12
/**
13
 * This is the model class for table "{{%banner_translation}}".
14
 *
15
 * @property int $id
16
 * @property int $banner_id
17
 * @property string $language
18
 * @property string $content
19
 * @property string $hint
20
 * @property string $file_name
21
 * @property string $alt
22
 * @property string $link
23
 *
24
 * @property Banner $banner
25
 *
26
 * @author Vladimir Kuprienko <[email protected]>
27
 * @since 1.0
28
 */
29
class BannerTranslation extends ActiveRecord
30
{
31
    /**
32
     * @inheritdoc
33
     */
34
    public static function tableName()
35
    {
36
        return '{{%banner_translation}}';
37
    }
38
39
    /**
40
     * @return \yii\db\ActiveQuery
41
     */
42
    public function getBanner()
43
    {
44
        return $this->hasOne(Banner::class, ['id' => 'banner_id']);
45
    }
46
}
47