/var/www/vhosts/ihelp.ro/httpdocs/src/Controller/Admin
NameSizeModeActions
AdminController.php57720644editdlrm
BankAccountsController.php31440644editdlrm
BannersController.php45400644editdlrm
CategoriesController.php44980644editdlrm
CauseNewsController.php21450644editdlrm
CausesController.php87590644editdlrm
CronsController.php18000644editdlrm
DashboardController.php10620644editdlrm
DocumentsController.php36490644editdlrm
DonationsController.php5590644editdlrm
GalleryImagesController.php32460644editdlrm
OrdersController.php44760644editdlrm
ProductsController.php56420644editdlrm
ProposedCausesController.php33390644editdlrm
SettingsController.php31570644editdlrm
SponsorsActivitiesController.php40030644editdlrm
SponsorsController.php36470644editdlrm
TagsController.php26520644editdlrm
UsersController.php82440644editdlrm
Edit: /var/www/vhosts/ihelp.ro/httpdocs/src/Controller/Admin/BankAccountsController.php (3144B)
paginate = [ 'contain' => ['Causes'], ]; $bankAccounts = $this->paginate($this->BankAccounts); $bankAccountType = Configure::read('account_type'); $this->set(compact('bankAccounts','bankAccountType')); } /** * Add method */ public function add() { $bankAccount = $this->BankAccounts->newEmptyEntity(); if ($this->request->is('post')) { $bankAccount = $this->BankAccounts->patchEntity($bankAccount, $this->request->getData()); if ($this->BankAccounts->save($bankAccount)) { $this->Flash->success(__('The bank account has been saved.')); return $this->redirect(['prefix' => 'Admin', 'controller' => 'BankAccounts', 'action' => 'add']); } $this->Flash->error(__('The bank account could not be saved. Please, try again.')); } $causes = $this->BankAccounts->Causes->find('list', ['limit' => 200]); $bankAccountType = Configure::read('account_type'); $this->set(compact('bankAccount', 'causes', 'bankAccountType')); } /** * Edit method */ public function edit($id = null) { $bankAccount = $this->BankAccounts->get($id, [ 'contain' => [], ]); if ($this->request->is(['patch', 'post', 'put'])) { $bankAccount = $this->BankAccounts->patchEntity($bankAccount, $this->request->getData()); if ($this->BankAccounts->save($bankAccount)) { $this->Flash->success(__('The bank account has been saved.')); return $this->redirect(['prefix' => 'Admin', 'controller' => 'BankAccounts', 'action' => 'edit', 'id' => $id]); } $this->Flash->error(__('The bank account could not be saved. Please, try again.')); } $causes = $this->BankAccounts->Causes->find('list', ['limit' => 200]); $bankAccountType = Configure::read('account_type'); $this->set(compact('bankAccount', 'causes', 'bankAccountType')); } /** * Delete method */ public function changeStatus($id = null) { $this->request->allowMethod(['post', 'delete']); $bankAccount = $this->BankAccounts->get($id); $bankAccount->is_active = $bankAccount->is_active ? false : true; if ($this->BankAccounts->save($bankAccount)) { if ($bankAccount->is_active == true) { $this->Flash->success(__('The bank account has been enabled.')); } else { $this->Flash->success(__('The bank account has been disabled.')); } } else { $this->Flash->error(__('The bank account could not be disabled. Please, try again.')); } return $this->redirect(['prefix' => 'Admin', 'controller' => 'BankAccounts', 'action' => 'index']); } }