live_weather.module in Live Weather 8.2
Same filename and directory in other branches
Provides a customized live weather report using Yahoo weather API.
File
live_weather.moduleView source
<?php
/**
* @file
* Provides a customized live weather report using Yahoo weather API.
*/
use Drupal\Core\Routing\RouteMatchInterface;
/**
* Implements hook_help().
*/
function live_weather_help($route_name, RouteMatchInterface $route_match) {
switch ($route_name) {
case 'help.page.live_weather':
$output = '';
$output .= '<h3>' . t('About') . '</h3>';
$output .= '<p>' . t('<p>A simple module provides a customized live weather report using Yahoo weather API.
Enter Where On Earth IDentification (WOEID) of location to use this url <a>http://woeid.rosselliot.co.nz</a>, will get the location details.
</p>
<p>Create Yahoo App in <a>https://developer.yahoo.com/apps/</a> and update keys in configuration page. </p>
On the settings page, we able to hide or show Forecast image, Wind speed, Humidity level, Visibility level, Sunrise time, Sunset time in Weather block.
Able to customize locations display in different blocks. Cache option will change the refresh time of Weather report.<p>');
return $output;
}
}
/**
* Implements hook_theme().
*/
function live_weather_theme($existing, $type, $theme, $path) {
return [
'live_weather' => [
'variables' => [
'weather_detail' => NULL,
],
],
];
}
Functions
Name | Description |
---|---|
live_weather_help | Implements hook_help(). |
live_weather_theme | Implements hook_theme(). |