本文整理汇总了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;
}
示例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);
}
示例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;
}