/** * @inheritdoc */ public function bootstrap($app) { if (!Module::isEnabled()) { return true; } $events = Yii::$app->db->getTableSchema(Item::tableName()) ? (new Item())->moduleEventList() : []; EventManagerBootstrap::getEventManager($app)->attachEvents($events); return $this; }
public function down() { return $this->dropTable(Item::tableName()); }