コード例 #1
0
 public function readnotificationsAction()
 {
     $request = $this->getRequest();
     if ($request->isPost()) {
         $model = new Practitioners();
         $session = new Container('frontend');
         $api_url = $this->getServiceLocator()->get('config')['api_url']['value'];
         if ($model->readNotifications($api_url, $request->getPost('tab'), $session->userid)) {
             echo json_encode(array('status' => 1, 'notifications' => $model->getNotifications($api_url)));
         } else {
             echo json_encode(array('status' => 0, 'notifications' => $model->getNotifications($api_url)));
         }
     }
     exit;
 }