本文整理汇总了PHP中OperationsData::GetAllHubs方法的典型用法代码示例。如果您正苦于以下问题:PHP OperationsData::GetAllHubs方法的具体用法?PHP OperationsData::GetAllHubs怎么用?PHP OperationsData::GetAllHubs使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OperationsData
的用法示例。
在下文中一共展示了OperationsData::GetAllHubs方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: index
/**
* Pilots::index()
*
* @return
*/
public function index()
{
// Get all of our hubs, and list pilots by hub
$allhubs = OperationsData::GetAllHubs();
if (!$allhubs) {
$allhubs = array();
}
foreach ($allhubs as $hub) {
$this->set('title', $hub->name);
$this->set('icao', $hub->icao);
$pilot_list = PilotData::findPilots(array('p.hub' => $hub->icao));
$this->set('allpilots', $pilot_list);
# deprecated
$this->set('pilot_list', $pilot_list);
$this->render('pilots_list.tpl');
}
$nohub = PilotData::findPilots(array('p.hub' => ''));
if (!$nohub) {
return;
}
$this->set('title', 'No Hub');
$this->set('icao', '');
$this->set('allpilots', $nohub);
# deprecated
$this->set('pilot_list', $nohub);
$this->render('pilots_list.tpl');
}
示例2: ShowForm
protected function ShowForm()
{
$this->set('extrafields', RegistrationData::GetCustomFields());
$this->set('allairlines', OperationsData::GetAllAirlines(true));
$this->set('allhubs', OperationsData::GetAllHubs());
$this->set('countries', Countries::getAllCountries());
$this->render('registration_mainform.tpl');
}
示例3: foreach
</select>
</td>
</tr>
<tr>
<td align="right"><b>Transfer Hours:</b></td>
<td><input type="text" name="transferhours" value="<?php
echo $pilot->transferhours;
?>
" /></td>
</tr>
<tr>
<td align="right"><b>Hub:</b></td>
<td>
<select name="hub">
<?php
$allhubs = OperationsData::GetAllHubs();
foreach ($allhubs as $hub) {
if ($pilot->hub == $hub->icao) {
$sel = ' selected';
} else {
$sel = '';
}
echo '<option value="' . $hub->icao . '" ' . $sel . '>' . $hub->icao . ' - ' . $hub->name . '</option>';
}
?>
</select>
</td>
</tr>
<tr>
<td align="right"><b>Total Flights:</b></td>