コード例 #1
0
 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);
     }
 }
コード例 #2
0
 /**
  * Checks if the Atuin CMS system it's fully installed
  *
  * @return bool
  */
 public static function checkInstallation()
 {
     return FileSystem::fileSystem()->has('installation.php');
 }
コード例 #3
0
 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);
 }