Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- protected function createFallbackQuery($category, $language, $fallbackLanguage)
- {
- return (new Query())->select(['message' => 't1.message', 'translation' => 't2.translation'])
- ->from(['t1' => $this->sourceMessageTable, 't2' => $this->messageTable])
- ->where([
- 't1.id' => new Expression('[[t2.id]]'),
- 't1.category' => $category,
- 't2.language' => $fallbackLanguage,
- ])->andWhere([
- 'NOT IN', 't2.id', (new Query())->select('[[id]]')->from($this->messageTable)->where(['language' => $language])
- ]);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement