public static function generateConfigFiles() { foreach (['app-backend', 'app-frontend'] as $type) { // LOAD APP DATA $config = ArrayHelper::merge([], ModelConfig::getActiveSectionConfigs($type)); $configPath = \Yii::$app->getModule('installation')->getSubdirectories('config'); FileSystem::createFile($configPath . '/' . $type . '.php', $config); } }
/** * Checks if the Atuin CMS system it's fully installed * * @return bool */ public static function checkInstallation() { return FileSystem::fileSystem()->has('installation.php'); }
public function databaseInstallation() { $data = ['components' => ['db' => ['class' => 'yii\\db\\Connection', 'dsn' => 'mysql:host=' . $this->host . ';dbname=' . $this->dbname, 'username' => $this->db_username, 'password' => $this->db_password, 'charset' => $this->charsetList($this->charset)]]]; $configPath = \Yii::$app->getModule('installation')->getSubdirectories('config'); FileSystem::createFile($configPath . '/config-db.php', $data); }