| Total Complexity | 2 |
| Total Lines | 26 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 18 | class EmailTemplateQuery extends ActiveQuery |
||
| 19 | { |
||
| 20 | /** |
||
| 21 | * Add by key condition. |
||
| 22 | * |
||
| 23 | * @param string $key Email template key. |
||
| 24 | * |
||
| 25 | * @return EmailTemplateQuery |
||
| 26 | */ |
||
| 27 | public function byKey($key) |
||
| 28 | { |
||
| 29 | return $this->where(['key' => $key]); |
||
| 30 | } |
||
| 31 | |||
| 32 | /** |
||
| 33 | * Get with translation by language. |
||
| 34 | * |
||
| 35 | * @param string $language |
||
| 36 | * |
||
| 37 | * @return EmailTemplateQuery |
||
| 38 | */ |
||
| 39 | public function withTranslation($language) |
||
| 44 | }]); |
||
| 45 | } |
||
| 47 |