Exemplo n.º 1
0
 /**
  * Return notes on basis of search key.
  *
  * @author Kuldeep Dangi <*****@*****.**>
  */
 public function actionSearchNotes()
 {
     $model = new Extensions();
     if (!empty($_GET['key'])) {
         $this->result['data'] = $model->getNotesBySearchKey($_GET['key']);
     } else {
         $this->result['data'] = $model->findAllByAttributes(array('status' => 1, 'public' => 1), array('limit' => 50));
     }
     $this->result['success'] = true;
     $this->sendResponse($this->result);
 }