当前位置: 首页>>代码示例>>PHP>>正文


PHP Handler::listDirections方法代码示例

本文整理汇总了PHP中Handler::listDirections方法的典型用法代码示例。如果您正苦于以下问题:PHP Handler::listDirections方法的具体用法?PHP Handler::listDirections怎么用?PHP Handler::listDirections使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Handler的用法示例。


在下文中一共展示了Handler::listDirections方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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


注:本文中的Handler::listDirections方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。