本文整理匯總了PHP中Icon::getSportIconForGif方法的典型用法代碼示例。如果您正苦於以下問題:PHP Icon::getSportIconForGif方法的具體用法?PHP Icon::getSportIconForGif怎麽用?PHP Icon::getSportIconForGif使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Icon
的用法示例。
在下文中一共展示了Icon::getSportIconForGif方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: displayRekorde
/**
* Display the table with general records
*/
private function displayRekorde()
{
foreach ($this->rekorde as $rekord) {
echo '<table class="fullwidth zebra-style">';
echo '<thead><tr><th colspan="11" class="l">' . $rekord['name'] . '</th></tr></thead>';
echo '<tbody>';
$output = false;
$sports = DB::getInstance()->query($rekord['sportquery'])->fetchAll();
$Request = DB::getInstance()->prepare($rekord['datquery']);
foreach ($sports as $sport) {
$Request->bindValue('sportid', $sport['id']);
$Request->execute();
$data = $Request->fetchAll();
if (!empty($data)) {
$output = true;
echo '<tr class="r">';
echo '<td class="b l">' . Icon::getSportIconForGif($sport['img'], $sport['name']) . ' ' . $sport['name'] . '</td>';
$j = 0;
foreach ($data as $j => $dat) {
if ($rekord['speed']) {
$Pace = new Pace($dat['s'], $dat['distance'], SportFactory::getSpeedUnitFor($sport['id']));
$code = $Pace->valueWithAppendix();
} else {
$code = $dat['distance'] != 0 ? Distance::format($dat['distance']) : Duration::format($dat['s']);
}
echo '<td class="small"><span title="' . date("d.m.Y", $dat['time']) . '">
' . Ajax::trainingLink($dat['id'], $code) . '
</span></td>';
}
for (; $j < 9; $j++) {
echo HTML::emptyTD();
}
echo '</tr>';
}
}
if (!$output) {
echo '<tr><td colspan="11"><em>' . __('No data available') . '</em></td></tr>';
}
echo '</tbody>';
echo '</table>';
}
}
示例2: Icon
/**
* Get icon for this sport
* @param string $tooltip optional parameter for tooltip
* @return string
*/
public function Icon($tooltip = '')
{
return Icon::getSportIconForGif($this->data['img'], $tooltip);
}