1 | <?php |
||
25 | class Association extends ActiveRecord |
||
26 | { |
||
27 | use SiteAttributeTrait, |
||
28 | FieldAttributeTrait, |
||
29 | SortableTrait; |
||
30 | |||
31 | /** |
||
32 | * @inheritdoc |
||
33 | */ |
||
34 | const TABLE_ALIAS = 'elementlist'; |
||
35 | |||
36 | /** |
||
37 | * @inheritdoc |
||
38 | */ |
||
39 | protected $getterPriorityAttributes = ['fieldId', 'siteId']; |
||
40 | |||
41 | /** |
||
42 | * @noinspection PhpDocMissingThrowsInspection |
||
43 | * @return AssociationQuery |
||
44 | */ |
||
45 | public static function find(): AssociationQuery |
||
51 | |||
52 | /******************************************* |
||
53 | * RULES |
||
54 | *******************************************/ |
||
55 | |||
56 | /** |
||
57 | * @return array |
||
58 | */ |
||
59 | public function rules(): array |
||
97 | |||
98 | /** |
||
99 | * @inheritdoc |
||
100 | */ |
||
101 | public function beforeSave($insert) |
||
113 | |||
114 | /** |
||
115 | * @inheritdoc |
||
116 | * @throws \yii\db\Exception |
||
117 | */ |
||
118 | public function afterSave($insert, $changedAttributes) |
||
131 | |||
132 | /** |
||
133 | * @inheritdoc |
||
134 | * @throws \yii\db\Exception |
||
135 | */ |
||
136 | public function afterDelete() |
||
149 | } |
||
150 |