コード例 #1
0
ファイル: Member.php プロジェクト: block8/octo
 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;
         }
     }
 }
コード例 #2
0
ファイル: ContactController.php プロジェクト: block8/octo
 public function delete($contactId)
 {
     $contact = $this->contactStore->getById($contactId);
     if (!empty($contact)) {
         $this->contactStore->delete($contact);
     }
     return $this->redirect('/contact')->success('Contact deleted.');
 }
コード例 #3
0
 public function delete($contactId)
 {
     $contact = $this->contactStore->getById($contactId);
     if (!empty($contact)) {
         $this->contactStore->delete($contact);
     }
     $this->successMessage('Contact deleted.', true);
     $this->redirect('/contact');
 }