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


PHP Handler::listConditions方法代碼示例

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


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

示例1: editAction

 /**
  * Render edit handler page
  */
 public function editAction()
 {
     $id = (int) $this->_getParam('id');
     $type = (int) $this->_getParam('type');
     $this->_handler = new Handler();
     if ($id > 0) {
         $this->_handler->handlerId = $id;
         $this->_handler->populate();
     }
     $this->view->listConditions = array('');
     if (strlen($this->_handler->conditionObject) > 0) {
         $this->_handler->condition = $this->_customKey;
         $this->view->listConditions[$this->_customKey] = $this->_customName;
     }
     foreach (Handler::listConditions() as $id => $name) {
         $this->view->listConditions[$id] = $name;
     }
     $this->_form = new WebVista_Form(array('name' => 'edit'));
     $this->_form->setAction(Zend_Registry::get('baseUrl') . 'handlers.raw/process-edit');
     $this->_form->loadORM($this->_handler, 'handler');
     $this->_form->setWindow('winEditHandlerId');
     $this->view->form = $this->_form;
     $this->view->callback = $this->_getParam('callback', '');
     $dataSource = new DataIntegrationDatasource($type);
     if ($type === Handler::HANDLER_TYPE_HL7) {
         $dataSourceIterator = $dataSource->getIterator();
     } else {
         $dataSourceIterator = $dataSource->getCustomIterator();
     }
     $this->view->listDatasources = array('');
     $dataIntegrationDatasourceName = $this->_handler->dataIntegrationDatasource->name;
     $dataIntegrationDatasourceId = $this->_handler->dataIntegrationDatasource->dataIntegrationDatasourceId;
     if (strlen($dataIntegrationDatasourceName) > 0) {
         $this->view->listDatasources[$dataIntegrationDatasourceId] = $dataIntegrationDatasourceName;
     }
     foreach ($dataSourceIterator as $item) {
         $this->view->listDatasources[$item->dataIntegrationDatasourceId] = $item->name;
     }
     $template = new DataIntegrationTemplate($type);
     if ($type === Handler::HANDLER_TYPE_HL7) {
         $templateIterator = $template->getIterator();
     } else {
         $templateIterator = $template->getCustomIterator();
     }
     $this->view->listTemplates = array('');
     $dataIntegrationTemplateName = $this->_handler->dataIntegrationTemplate->name;
     $dataIntegrationTemplateId = $this->_handler->dataIntegrationTemplate->dataIntegrationTemplateId;
     if (strlen($dataIntegrationTemplateName) > 0) {
         $this->view->listTemplates[$dataIntegrationTemplateId] = $dataIntegrationTemplateName;
     }
     foreach ($templateIterator as $item) {
         $this->view->listTemplates[$item->dataIntegrationTemplateId] = $item->name;
     }
     // lines below are for HL7 only
     if ($type === Handler::HANDLER_TYPE_HL7) {
         $this->view->listDirections = array('');
         foreach (Handler::listDirections() as $id => $name) {
             $this->view->listDirections[$id] = $name;
         }
         $destination = new DataIntegrationDestination($type);
         $destinationIterator = $destination->getIterator();
         $this->view->listDestinations = array('');
         foreach ($destinationIterator as $item) {
             $this->view->listDestinations[$item->dataIntegrationDestinationId] = $item->name;
         }
         $action = new DataIntegrationAction($type);
         $actionIterator = $action->getIterator();
         $this->view->listActions = array('');
         foreach ($actionIterator as $item) {
             $this->view->listActions[$item->dataIntegrationActionId] = $item->name;
         }
     }
     $this->render('edit');
 }
開發者ID:dragonlet,項目名稱:clearhealth,代碼行數:77,代碼來源:HandlersController.php

示例2: listHandlersAction

 public function listHandlersAction()
 {
     $handler = new HealthStatusHandler();
     $handlerIterator = $handler->getIterator();
     $listConditions = Handler::listConditions();
     $rows = array();
     foreach ($handlerIterator as $item) {
         $condition = 'Custom';
         if (isset($listConditions[$item->condition]) && !strlen($item->handlerObject) > 0) {
             $condition = $listConditions[$item->condition];
         }
         $tmp = array();
         $tmp['id'] = $item->healthStatusHandlerId;
         $tmp['data'][] = $item->name;
         $tmp['data'][] = $condition;
         $tmp['data'][] = $item->timeframe;
         $tmp['data'][] = $item->active ? __('Yes') : __('No');
         $tmp['data'][] = '<a href="javascript:void(0)" onclick="viewSubscribedPatients(' . $item->healthStatusHandlerId . ')" title="' . __('View Subscribed Patients') . '">' . __('View Patients') . '</a>';
         $rows[] = $tmp;
     }
     $json = Zend_Controller_Action_HelperBroker::getStaticHelper('json');
     $json->suppressExit = true;
     $json->direct(array('rows' => $rows));
 }
開發者ID:dragonlet,項目名稱:clearhealth,代碼行數:24,代碼來源:HealthStatusController.php

示例3: listHandlersAction

 public function listHandlersAction()
 {
     $handler = new GeneralAlertHandler();
     $handlerIterator = $handler->getIterator();
     $listConditions = Handler::listConditions();
     $rows = array();
     foreach ($handlerIterator as $item) {
         $condition = 'Custom';
         if (isset($listConditions[$item->condition]) && !strlen($item->handlerObject) > 0) {
             $condition = $listConditions[$item->condition];
         }
         $tmp = array();
         $tmp['id'] = $item->generalAlertHandlerId;
         $tmp['data'][] = $item->name;
         $tmp['data'][] = $condition;
         $tmp['data'][] = $item->active ? __('Yes') : __('No');
         $rows[] = $tmp;
     }
     $json = Zend_Controller_Action_HelperBroker::getStaticHelper('json');
     $json->suppressExit = true;
     $json->direct(array('rows' => $rows));
 }
開發者ID:jakedorst,項目名稱:ch3-dev-preview,代碼行數:22,代碼來源:GeneralAlertsController.php


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