コード例 #1
0
ファイル: Installer.php プロジェクト: NullRefExcep/yii2-core
 public function uninstall()
 {
     $path = $this->getComposerPath();
     if (file_exists($path)) {
         @unlink($path);
     }
     parent::uninstall();
 }
コード例 #2
0
ファイル: Installer.php プロジェクト: NullRefExcep/yii2-cms
 public function install()
 {
     parent::install();
     if (Console::confirm('Create upload folder?')) {
         try {
             $this->createFolder('@webroot/uploads');
             Console::output('Folder @webroot/uploads was created');
         } catch (\Exception $e) {
             Console::output($e->getMessage());
         }
     }
 }
コード例 #3
0
ファイル: Installer.php プロジェクト: NullRefExcep/yii2-admin
 public function install()
 {
     parent::install();
     if (Console::confirm('Create assets files?')) {
         try {
             $this->createFile('@webroot/js/admin/scripts.js');
             echo 'File @webroot/js/admin/scripts.js was created' . PHP_EOL;
             $this->createFile('@webroot/css/admin/main.css');
             echo 'File @webroot/css/admin/main.css was created' . PHP_EOL;
         } catch (\Exception $e) {
             echo $e->getMessage() . PHP_EOL;
         }
     }
 }