コード例 #1
0
ファイル: Database.php プロジェクト: opis-colibri/install
 protected function getPage(array $data)
 {
     $data['alerts'] = System::alerts();
     $data['jumbotron'] = view('install.jumbotron', ['title' => 'Database connection', 'description' => 'Setup your default database connection.', 'logo' => asset('opis-colibri/system', 'opis-colibri.png'), 'button' => ['link' => getURL('/install/account'), 'text' => 'Skip this step']]);
     $data['supported'] = class_exists('\\PDO');
     return ['title' => 'Database', 'content' => view('install.page.database', $data)];
 }
コード例 #2
0
ファイル: Index.php プロジェクト: opis-colibri/manager
 public function post()
 {
     $validator = validator();
     $validator->csrf()->validate('csrf', request()->post('csrf_token'));
     if ($validator->hasErrors()) {
         System::alerts()->fromValidator($validator);
         redirect(getURL('/module-manager'));
     }
     if (request()->post('action') === 'logout') {
         session()->destroy();
         System::alerts()->success(t('You have been logged out'));
         redirect(getURL('/module-manager/login'));
     }
     if (app()->getCollector()->recollect()) {
         System::alerts()->success(t('All items have been collected'));
     } else {
         System::alerts()->success(t('Collecting items has failed'));
     }
     redirect(getURL('/module-manager'));
 }
コード例 #3
0
ファイル: Module.php プロジェクト: opis-colibri/manager
 public function post()
 {
     $modules = request()->post('module', []);
     if (!is_array($modules)) {
         redirect(getURL('/module-manager'));
     }
     foreach ($modules as $module => $action) {
         if (!in_array($action, array('enable', 'disable', 'install', 'uninstall'))) {
             continue;
         }
         $module = getModule($module);
         if (!$module->exists()) {
             continue;
         }
         if ($module->{$action}()) {
             $text = r('Module <stron>@module</strong> was @action', ['module' => $module->name(), 'action' => t($action . 'd')]);
             System::alerts()->success($text);
         } else {
             $text = r('Module <stron>@module</strong> could not be @action', array('module' => $module->name(), 'action' => t($action . 'd')));
             System::alerts()->error($text);
         }
     }
     redirect(getURL('/module-manager'));
 }
コード例 #4
0
ファイル: Login.php プロジェクト: opis-colibri/manager
 protected function getContent(array $values)
 {
     return view('manager.login', ['alerts' => System::alerts(), 'username' => $values['username'] ?? null, 'password' => $values['password'] ?? null]);
 }
コード例 #5
0
ファイル: Setup.php プロジェクト: opis-colibri/manager
 protected function getContent(array $values = [])
 {
     $values += ['olduser' => null, 'oldpass' => null, 'username' => null, 'password' => null, 'check' => null];
     return view('manager.setup', ['alerts' => System::alerts(), 'olduser' => $values['olduser'], 'oldpass' => $values['oldpass'], 'username' => $values['username'], 'password' => $values['password'], 'check' => $values['check']]);
 }
コード例 #6
0
ファイル: Account.php プロジェクト: opis-colibri/install
 protected function getPage(array $data)
 {
     $data['alerts'] = System::alerts();
     $data['jumbotron'] = view('install.jumbotron', ['title' => 'Account setup', 'description' => 'Setup your administrator account.', 'logo' => asset('opis-colibri/system', 'opis-colibri.png'), 'button' => ['link' => getURL('/install/finish'), 'text' => 'Skip this step']]);
     return ['title' => 'Account', 'content' => view('install.page.account', $data)];
 }
コード例 #7
0
ファイル: Create.php プロジェクト: opis-colibri/manager
 /**
  * @param array $values
  * @return \Opis\Colibri\View
  */
 protected function getContent(array $values = array())
 {
     $values += ['username' => null, 'password' => null, 'check' => null];
     return view('manager.create', ['alerts' => System::alerts(), 'username' => $values['username'], 'password' => $values['password'], 'check' => $values['check']]);
 }