/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/SponsorsActivitiesController.php (4003B)
paginate($this->SponsorsActivities); $this->set(compact('sponsorsActivities')); } /** * View method * * @param string|null $id Sponsors Activity id. * @return \Cake\Http\Response|null|void Renders view * @throws \Cake\Datasource\Exception\RecordNotFoundException When record not found. */ public function view($id = null) { $sponsorsActivity = $this->SponsorsActivities->get($id, [ 'contain' => [], ]); $this->set(compact('sponsorsActivity')); } /** * Add method * * @return \Cake\Http\Response|null|void Redirects on successful add, renders view otherwise. */ public function add() { $sponsorId = $this->request->getQuery('sponsor_id'); $sponsorsActivity = $this->SponsorsActivities->newEmptyEntity(); if ($this->request->is('post')) { $data = $this->request->getData(); $data['sponsor_id'] = $sponsorId; $sponsorsActivity = $this->SponsorsActivities->patchEntity($sponsorsActivity, $data); if ($this->SponsorsActivities->save($sponsorsActivity)) { $this->Flash->success(__('The sponsors activity has been saved.')); return $this->redirect(['controller' => 'Sponsors', 'action' => 'edit', $sponsorId]); } $this->Flash->error(__('The sponsors activity could not be saved. Please, try again.')); } $this->set(compact('sponsorsActivity')); } /** * Edit method * * @param string|null $id Sponsors Activity id. * @return \Cake\Http\Response|null|void Redirects on successful edit, renders view otherwise. * @throws \Cake\Datasource\Exception\RecordNotFoundException When record not found. */ public function edit($id = null) { $sponsorsActivity = $this->SponsorsActivities->get($id, [ 'contain' => [], ]); $sponsorId = $sponsorsActivity->sponsor_id; if ($this->request->is(['patch', 'post', 'put'])) { $sponsorsActivity = $this->SponsorsActivities->patchEntity($sponsorsActivity, $this->request->getData()); if ($this->SponsorsActivities->save($sponsorsActivity)) { $this->Flash->success(__('The sponsors activity has been saved.')); return $this->redirect(['controller' => 'Sponsors', 'action' => 'edit', $sponsorId]); } $this->Flash->error(__('The sponsors activity could not be saved. Please, try again.')); } $this->set(compact('sponsorsActivity')); } /** * Delete method * * @param string|null $id Sponsors Activity id. * @return \Cake\Http\Response|null|void Redirects to index. * @throws \Cake\Datasource\Exception\RecordNotFoundException When record not found. */ public function delete($id = null) { $this->request->allowMethod(['post', 'delete']); $sponsorsActivity = $this->SponsorsActivities->get($id); $sponsorId = $sponsorsActivity->sponsor_id; if ($this->SponsorsActivities->delete($sponsorsActivity)) { $this->Flash->success(__('The sponsors activity has been deleted.')); } else { $this->Flash->error(__('The sponsors activity could not be deleted. Please, try again.')); } return $this->redirect(['controller' => 'Sponsors', 'action' => 'edit', $sponsorId]); } }