1 | <?php |
||
20 | class Banner extends CommonBanner |
||
21 | { |
||
22 | /** |
||
23 | * @inheritdoc |
||
24 | */ |
||
25 | public static function find() |
||
29 | |||
30 | /** |
||
31 | * @inheritdoc |
||
32 | */ |
||
33 | public function behaviors() |
||
34 | { |
||
35 | $behaviors = parent::behaviors(); |
||
36 | $behaviors['timestamp'] = TimestampBehavior::class; |
||
37 | return $behaviors; |
||
38 | } |
||
39 | |||
40 | /** |
||
41 | * @inheritdoc |
||
42 | */ |
||
43 | public function loadDefaultValues($skipIfSet = true) |
||
44 | { |
||
45 | $this->slug = 'banner-' . (self::find()->count() + 1); |
||
46 | return parent::loadDefaultValues($skipIfSet); |
||
47 | } |
||
48 | |||
49 | /** |
||
50 | * @inheritdoc |
||
51 | */ |
||
52 | public function rules() |
||
70 | |||
71 | /** |
||
72 | * @inheritdoc |
||
73 | */ |
||
74 | public function attributeLabels() |
||
86 | |||
87 | /** |
||
88 | * @inheritdoc |
||
89 | */ |
||
90 | public function transactions() |
||
96 | |||
97 | /** |
||
98 | * @inheritdoc |
||
99 | */ |
||
100 | public function getTranslations() |
||
104 | } |
||
105 |