function theme_yr_verdata_table in Yr Weatherdata 7
Same name and namespace in other branches
- 6.2 yr_verdata.module \theme_yr_verdata_table()
Theme function for displaying forecast in a short, inline presentation, for example in a table cell.
Parameters
$forecast: An array with various forecast parameters prepared for output.
Return value
Returns the forecast parameters in the correct order, ready for the screen.
File
- ./
yr_verdata.module, line 885 - yr_verdata.module This file contains the code for getting the forecast from yr.no and displaying it on a Drupal site.
Code
function theme_yr_verdata_table($forecast) {
$output = array();
$output['time'] = array(
'#markup' => $forecast['time'],
'#prefix' => '<p class="yr-period-time">',
'#suffix' => '</p>',
);
$output['symbol'] = array(
'#markup' => $forecast['symbol'],
'#prefix' => '<p class="yr-period-forecast"><span class="yr-symbol">',
'#suffix' => '</span>',
);
$output['wind'] = array(
'#markup' => $forecast['wind'],
'#prefix' => '<span class="yr-wind">',
'#suffix' => '</span>',
);
$output['temp'] = array(
'#markup' => $forecast['temp'],
// This doesn't get a span because it's already been added, for differentiating between above and below freezing.
'#suffix' => '</p>',
);
return drupal_render($output);
}