Exemplo n.º 1
0
 /**
  * Loads the messages from database.
  * You may override this method to customize the message storage in the database.
  * @param string $category the message category.
  * @param string $language the target language.
  * @return array the messages loaded from database.
  */
 protected function loadMessagesFromDb($category, $language)
 {
     $messages = i18nModel::findAll(['category' => $category, 'locale' => $language]);
     return ArrayHelper::map($messages, 'source', 'message');
 }