1 | <?php |
||
25 | abstract class IntegrationConnection extends ActiveRecordWithId |
||
26 | { |
||
27 | use HandleRulesTrait; |
||
28 | |||
29 | /** |
||
30 | * The query class this record uses |
||
31 | */ |
||
32 | const QUERY_CLASS = IntegrationConnectionQuery::class; |
||
33 | |||
34 | /** |
||
35 | * @param static $record |
||
36 | * @param $row |
||
37 | */ |
||
38 | public static function populateRecord($record, $row) |
||
43 | |||
44 | |||
45 | /******************************************* |
||
46 | * QUERY |
||
47 | *******************************************/ |
||
48 | |||
49 | /** |
||
50 | * @noinspection PhpDocMissingThrowsInspection |
||
51 | * @return IntegrationConnectionQuery |
||
52 | */ |
||
53 | public static function find(): IntegrationConnectionQuery |
||
64 | |||
65 | /** |
||
66 | * @inheritdoc |
||
67 | */ |
||
68 | protected static function findByCondition($condition) |
||
77 | |||
78 | |||
79 | /******************************************* |
||
80 | * RULES |
||
81 | *******************************************/ |
||
82 | |||
83 | /** |
||
84 | * @inheritdoc |
||
85 | */ |
||
86 | public function rules() |
||
118 | |||
119 | |||
120 | /******************************************* |
||
121 | * EVENTS |
||
122 | *******************************************/ |
||
123 | |||
124 | /** |
||
125 | * @param bool $insert |
||
126 | * @param array $changedAttributes |
||
127 | */ |
||
128 | public function afterSave($insert, $changedAttributes) |
||
133 | |||
134 | |||
135 | /******************************************* |
||
136 | * SETTINGS |
||
137 | *******************************************/ |
||
138 | |||
139 | /** |
||
140 | * @param string $attribute |
||
141 | * @return mixed |
||
142 | */ |
||
143 | public function getSettingsValue(string $attribute) |
||
148 | |||
149 | /** |
||
150 | * @param string $attribute |
||
151 | * @param $value |
||
152 | * @return $this |
||
153 | */ |
||
154 | public function setSettingsValue(string $attribute, $value) |
||
162 | |||
163 | /** |
||
164 | * @return array|null |
||
165 | */ |
||
166 | protected function ensureSettings() |
||
178 | } |
||
179 |