public function init() { $this->store = Store::get('Contact'); if (!empty($_SESSION[$this->getSessionKey()])) { $member = $this->store->getById($_SESSION[$this->getSessionKey()]); if (!empty($member)) { $this->active = $member; } } }
public function delete($contactId) { $contact = $this->contactStore->getById($contactId); if (!empty($contact)) { $this->contactStore->delete($contact); } return $this->redirect('/contact')->success('Contact deleted.'); }
public function delete($contactId) { $contact = $this->contactStore->getById($contactId); if (!empty($contact)) { $this->contactStore->delete($contact); } $this->successMessage('Contact deleted.', true); $this->redirect('/contact'); }