/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/SettingsController.php (3157B)
paginate = [ 'limit' => ADMIN_PAGE_LIMIT ]; $settings = $this->paginate($this->Settings); $this->set(compact('settings')); } /** * View method */ public function view($id = null) { $setting = $this->Settings->get($id, [ 'contain' => [], ]); $this->set(compact('setting')); } /** * Add method */ public function add() { $setting = $this->Settings->newEmptyEntity(); if ($this->request->is('post')) { $setting = $this->Settings->patchEntity($setting, $this->request->getData()); if ($this->Settings->save($setting)) { $this->Flash->success(__('The setting has been saved.')); return $this->redirect(['prefix' => 'Admin', 'controller' => 'Settings', 'action' => 'index']); } $this->Flash->error(__('The setting could not be saved. Please, try again.')); } $types = Configure::read('type_settings'); $this->set(compact('setting', 'types')); } /** * Edit method */ public function edit($id = null) { if (!empty($id) && is_numeric($id)) { $setting = $this->Settings->get($id, [ 'contain' => [], ]); if ($this->request->is(['patch', 'post', 'put'])) { $setting = $this->Settings->patchEntity($setting, $this->request->getData()); if ($this->Settings->save($setting)) { $this->Flash->success(__('The setting has been saved.')); return $this->redirect(['prefix' => 'Admin', 'controller' => 'Settings', 'action' => 'edit', $id]); } $this->Flash->error(__('The setting could not be saved. Please, try again.')); } } else { $this->Flash->error(__('Oops. Please, try again.')); return $this->redirect(['prefix' => 'Admin', 'controller' => 'Settings', 'action' => 'index']); } $types = Configure::read('type_settings'); $this->set(compact('setting', 'types')); } /** * Delete method */ public function delete($id = null) { if (!empty($id) && is_numeric($id)) { $this->request->allowMethod(['post', 'delete']); $setting = $this->Settings->get($id); if ($this->Settings->delete($setting)) { $this->Flash->success(__('The setting has been deleted.')); } else { $this->Flash->error(__('The setting could not be deleted. Please, try again.')); } } else { $this->Flash->error(__('Oops. Please, try again.')); } return $this->redirect(['prefix' => 'Admin', 'controller' => 'Settings', 'action' => 'index']); } }