當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Documents::find方法代碼示例

本文整理匯總了PHP中Documents::find方法的典型用法代碼示例。如果您正苦於以下問題:PHP Documents::find方法的具體用法?PHP Documents::find怎麽用?PHP Documents::find使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Documents的用法示例。


在下文中一共展示了Documents::find方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: findByCategory

 /**
  * Return all documents that belong to a category
  *
  * @param DocumentCategory $category
  * @return array
  */
 function findByCategory($category)
 {
     return Documents::find(array('conditions' => array('category_id = ?', $category->getId()), 'order' => 'name'));
 }
開發者ID:NaszvadiG,項目名稱:activecollab_loc,代碼行數:10,代碼來源:Documents.class.php

示例2: postPrintQueue

 public function postPrintQueue($id)
 {
     $pid = Session::get('pid');
     $page = Input::get('page');
     $limit = Input::get('rows');
     $sidx = Input::get('sidx');
     $sord = Input::get('sord');
     $query = DB::table('hippa')->where('other_hippa_id', '=', $id)->get();
     if ($query) {
         $count = count($query);
         $total_pages = ceil($count / $limit);
     } else {
         $count = 0;
         $total_pages = 0;
     }
     if ($page > $total_pages) {
         $page = $total_pages;
     }
     $start = $limit * $page - $limit;
     if ($start < 0) {
         $start = 0;
     }
     $query1 = DB::table('hippa')->where('other_hippa_id', '=', $id)->orderBy($sidx, $sord)->skip($start)->take($limit)->get();
     $response['page'] = $page;
     $response['total'] = $total_pages;
     $response['records'] = $count;
     $i = 0;
     foreach ($query1 as $row1) {
         $row = (array) $row1;
         if (isset($row['eid'])) {
             $result1 = Encounters::find($row['eid']);
             $row['description'] = $result1->encounter_cc;
             $row['date'] = $result1->encounter_DOS;
             $row['type'] = 'Encounter';
         }
         if (isset($row['t_messages_id'])) {
             $result2 = T_messages::find($row['t_messages_id']);
             $row['description'] = $result2->t_messages_subject;
             $row['date'] = $result2->t_messages_dos;
             $row['type'] = 'Telephone Messages';
         }
         if (isset($row['documents_id'])) {
             $result3 = Documents::find($row['documents_id']);
             $row['description'] = $result3->documents_desc . ' from ' . $result3->documents_from;
             $row['date'] = $result3->documents_date;
             $row['type'] = $result3->documents_type;
         }
         $response['rows'][$i]['id'] = $row['hippa_id'];
         $response['rows'][$i]['cell'] = array($row['hippa_id'], $row['date'], $row['type'], $row['description']);
         $i++;
     }
     echo json_encode($response);
 }
開發者ID:carlosqueiroz,項目名稱:nosh-core,代碼行數:53,代碼來源:AjaxChartController.php

示例3: postDocumentsView

 public function postDocumentsView($id, $pid)
 {
     $result = Documents::find($id);
     $file_path = $result->documents_url;
     $data1 = array('documents_viewed' => Session::get('displayname'));
     DB::table('documents')->where('documents_id', '=', $id)->update($data);
     $this->audit('Update');
     $name = time() . '_' . $pid . '.pdf';
     $data['filepath'] = '/var/www/nosh/temp' . $name;
     copy($file_path, $data['filepath']);
     while (!file_exists($data['filepath'])) {
         sleep(2);
     }
     $data['html'] = '<iframe src="' . asset('temp/' . $name) . '" width="770" height="425" style="border: none;"></iframe>';
     $data['id'] = $id;
     echo json_encode($data);
 }
開發者ID:carlosqueiroz,項目名稱:nosh-core,代碼行數:17,代碼來源:AjaxOfficeController.php

示例4: bluebutton

 public function bluebutton($id)
 {
     $result = Documents::find($id);
     $file_path = $result->documents_url;
     $data['ccda'] = File::get($file_path);
     $data['js'] = File::get(__DIR__ . '/../../public/js/bluebutton1.js');
     return View::make('bluebutton', $data);
 }
開發者ID:akratech,項目名稱:nosh-core,代碼行數:8,代碼來源:AjaxCommonController.php

示例5: view_documents

 public function view_documents($id)
 {
     $result = Documents::find($id);
     $file_path = $result->documents_url;
     $data = array('documents_viewed' => Session::get('displayname'));
     DB::table('documents')->where('documents_id', '=', $id)->update($data);
     $this->audit('Update');
     return Response::download($file_path);
 }
開發者ID:carlosqueiroz,項目名稱:nosh-core,代碼行數:9,代碼來源:ChartController.php


注:本文中的Documents::find方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。