Download the PHP package th3mouk/yahoo-weather-bundle without Composer
On this page you can find all versions of the php package th3mouk/yahoo-weather-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package yahoo-weather-bundle
Yahoo Weather Bundle
This Symfony bundle providing communication and historian of Yahoo Weather API.
Installation
composer require th3mouk/yahoo-weather-bundle ^1.0@dev
Add to the appKernel.php
:
Full configuration of config.yml
Usage
This bundle provides two entities: Th3Mouk\YahooWeatherBundle\Entity\City
and Th3Mouk\YahooWeatherBundle\Entity\Forecast
.
The first one is relative to communication with the API, city object must have the name of the city like in the Yahoo Weather Documentation, or a WOEID code. The second is for data persistence and history retrieve.
Extends them or feel free to hack it !
Twig Extensions
Weather
You have two extensions to draw the forecasts, they use templates defined in configuration. Feel free to to implements or add your own !
Icons
You can add a pictogram helper in the configuration that activate this extension, that must implement Th3Mouk\YahooWeatherBundle\Helper\PictogramInterface
.
This is an exemple of PictogramHelper :
Sonata Integration Exemple
This bundle automatically provide an administration for cities.
The service is named th3mouk_yahoo_weather.admin.city
.
Add the admin group on the dashboard:
Don't forget to add this group on a block:
You're done! :+1:
TODO
- Add template option on weather twig extension
- Add today forecast without city object
- Remove sonata configuration in the bundle
- Add weather extension configuration
- Add twig extension of history
- Add twig extension for comparison of weather (today and Y-1)
- Add twig extension for comparison of weather (forecast and Y-1)
Please
Feel free to improve this bundle.
All versions of yahoo-weather-bundle with dependencies
symfony/config Version ~2.3
symfony/console Version ~2.3
symfony/dependency-injection Version ~2.3
symfony/http-kernel Version ~2.3
twig/twig Version ^1.12
th3mouk/yahoo-weather-api Version ^1.0@dev
gedmo/doctrine-extensions Version ^2.3.12