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()); } } }
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; } } }
public function install() { $this->downloadComposer(); parent::install(); }