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


PHP Firm::getSubspecialtyID方法代码示例

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


在下文中一共展示了Firm::getSubspecialtyID方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: canCreateEvent

 /**
  * @param Firm      $firm
  * @param Episode   $episode
  * @param EventType $event_type
  *
  * @return bool
  */
 public function canCreateEvent(Firm $firm = null, Episode $episode = null, EventType $event_type = null)
 {
     if ($event_type) {
         if ($event_type->disabled) {
             return false;
         }
         if (!$event_type->support_services && !$firm->getSubspecialtyID()) {
             // Can't create a non-support service event for a support-service firm
             return false;
         }
     }
     if ($firm && $episode) {
         return $this->canEditEpisode($firm, $episode);
     }
     return true;
 }
开发者ID:openeyes,项目名称:openeyes,代码行数:23,代码来源:AuthRules.php

示例2: getListWithSecondaryTo

 /**
  * @param Firm $firm
  * @return array
  * @throws CException
  */
 public static function getListWithSecondaryTo(Firm $firm)
 {
     if (empty($firm)) {
         throw new CException('Firm is required');
     }
     $disorders = array();
     $secondary_to = array();
     if ($ss_id = $firm->getSubspecialtyID()) {
         $cods = self::model()->with(array('disorder', 'secondary_to_disorders'))->findAllByAttributes(array('subspecialty_id' => $ss_id), array('order' => 'disorder.term'));
         foreach ($cods as $cod) {
             $disorders[] = $cod->disorder;
             if ($secondary_tos = $cod->secondary_to_disorders) {
                 $secondary_to[$cod->disorder_id] = CHtml::listData($secondary_tos, 'id', 'term');
             }
         }
     }
     return array(CHtml::listData($disorders, 'id', 'term'), $secondary_to);
 }
开发者ID:openeyeswales,项目名称:OpenEyes,代码行数:23,代码来源:CommonOphthalmicDisorder.php

示例3: getListByGroupWithSecondaryTo

 /**
  * Fetch array of disorders and associated secondary to disorders (and optionally findings)
  * @param Firm $firm
  * @return array
  * @throws CException
  */
 public static function getListByGroupWithSecondaryTo(Firm $firm)
 {
     if (empty($firm)) {
         throw new CException('Firm is required');
     }
     $disorders = array();
     if ($ss_id = $firm->getSubspecialtyID()) {
         $cods = self::model()->with(array('finding' => array('joinType' => 'LEFT JOIN'), 'disorder' => array('joinType' => 'LEFT JOIN'), 'group'))->findAll(array('condition' => 't.subspecialty_id = :subspecialty_id', 'params' => array(':subspecialty_id' => $ss_id)));
         foreach ($cods as $cod) {
             if ($cod->type) {
                 $disorder = array();
                 $group = $cod->group ? $cod->group->name : '';
                 $disorder['type'] = $cod->type;
                 $disorder['id'] = $cod->disorderOrFinding ? $cod->disorderOrFinding->id : null;
                 $disorder['label'] = $cod->disorderOrFinding ? $cod->disorderOrFinding->term : 'None';
                 $disorder['group'] = $group;
                 $disorder['alternate'] = $cod->alternate_disorder_id ? array('id' => $cod->alternate_disorder_id, 'label' => $cod->alternate_disorder->term, 'selection_label' => $cod->alternate_disorder_label, 'type' => 'disorder') : null;
                 $disorder['secondary'] = $cod->getSecondaryToList();
                 $disorders[] = $disorder;
             }
         }
     }
     return $disorders;
 }
开发者ID:code-4-england,项目名称:OpenEyes,代码行数:30,代码来源:CommonOphthalmicDisorder.php


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