public function init() { parent::init(); if (!isset($this->translations['platform']) && !isset($this->translations['platform*'])) { $this->translations['platform'] = ['class' => 'yii\\i18n\\GettextMessageSource', 'sourceLanguage' => P::$app->sourceLanguage, 'basePath' => '@platform/messages']; } if (!isset($this->translations['db']) && !isset($this->translations['db*'])) { $this->translations['db'] = ['class' => 'yii\\i18n\\DbMessageSource', 'sourceLanguage' => P::$app->sourceLanguage, 'sourceMessageTable' => models\MessageSource::tableName(), 'messageTable' => models\Message::tableName()]; } }
public function down() { $this->dropTable(Message::tableName()); $this->dropTable(MessageSource::tableName()); }