本文整理匯總了PHP中UserInfo::lookupUserNameByUID方法的典型用法代碼示例。如果您正苦於以下問題:PHP UserInfo::lookupUserNameByUID方法的具體用法?PHP UserInfo::lookupUserNameByUID怎麽用?PHP UserInfo::lookupUserNameByUID使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類UserInfo
的用法示例。
在下文中一共展示了UserInfo::lookupUserNameByUID方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: raptor_form_get_postexam_info
/**
* The QA stuff
*/
function raptor_form_get_postexam_info($form, &$form_state, $disabled, $myvalues, $supportEditMode = TRUE)
{
// information.
$root = array('#type' => 'fieldset', '#title' => t('Post-Examination Notes'), '#attributes' => array('class' => array('data-entry2-area')));
//Show all the existing notes
$q = db_select('raptor_form_qa', 'a');
$q->addField('a', 'rf_id');
$q->addField('a', 'user_id');
$q->addField('a', 'qa1_fl');
$q->addField('a', 'qa2_fl');
$q->addField('a', 'qa3_fl');
$q->addField('a', 'qa4_fl');
$q->addField('a', 'qa5_fl');
$q->addField('a', 'qa_notes_tx');
$q->addField('a', 'created_dt');
$q->condition('rf_id', $myvalues['guid']);
$rf = $q->execute();
$myvalues = array();
if ($rf->rowCount() > 0) {
$sHTML = "<table id='qa-notes'>";
$sHTML .= "<tr>";
$sHTML .= "<th width='20%'>Datetime</th>";
$sHTML .= "<th width='20%'>Author</th>";
$sHTML .= "<th>QA1</th>";
$sHTML .= "<th>QA2</th>";
$sHTML .= "<th>QA3</th>";
$sHTML .= "<th>QA4</th>";
$sHTML .= "<th>QA5</th>";
$sHTML .= "<th width='35%'>Notes</th>";
$sHTML .= "</tr>";
$nROW = 0;
foreach ($rf as $row) {
$nUID = $row->user_id;
//$oOtherUser=UserInfo::lookupUserByUID( $nUID );
$theName = UserInfo::lookupUserNameByUID($nUID);
$nROW += 1;
$sHTML .= "<tr>";
$sHTML .= "<td width='20%'>" . $row->created_dt . "</td>";
$sHTML .= "<td width='20%'>" . $theName . "</td>";
//$sHTML.="<td>".$oOtherUser->name."<td>";
$sHTML .= "<td>" . ($row->qa1_fl == 1 ? '<b>Yes</b>' : 'No') . "</td>";
$sHTML .= "<td>" . ($row->qa2_fl == 1 ? '<b>Yes</b>' : 'No') . "</td>";
$sHTML .= "<td>" . ($row->qa3_fl == 1 ? '<b>Yes</b>' : 'No') . "</td>";
$sHTML .= "<td>" . ($row->qa4_fl == 1 ? '<b>Yes</b>' : 'No') . "</td>";
$sHTML .= "<td>" . ($row->qa5_fl == 1 ? '<b>Yes</b>' : 'No') . "</td>";
$sHTML .= "<td width='35%'>" . $row->qa_notes_tx . "</td>";
$sHTML .= "</tr>";
}
$sHTML .= "</table>";
$root['qa_notes' . $nROW] = array('#markup' => $sHTML);
}
$oGrp1 = $root['postexam_fieldset_col1'] = array('#type' => 'fieldset');
$root['postexam_fieldset_col1']['postexam_qa_fieldset'] = array('#type' => 'fieldset', '#title' => t('QA Issues'));
$root['postexam_fieldset_col1']['postexam_qa_fieldset']['postexam_qa_fl'] = array('#type' => 'checkboxes', '#options' => array('QA1' => t('QA1'), 'QA2' => t('QA2'), 'QA3' => t('QA3'), 'QA4' => t('QA4'), 'QA5' => t('QA5')));
$oGrp2 = $root['postexam_fieldset_col2'] = array('#type' => 'fieldset');
$root['postexam_fieldset_col2']['qa_notes_tx'] = array('#type' => 'textarea', '#title' => t('Post-Examination Notes'), '#disabled' => $disabled);
$form['main_fieldset_bottom']['postexam_fieldset'] =& $root;
return $form;
}