Skip to content

lionelgaillard/WXRGeoBundle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WXRGeoBundle

Installation

Composer

        "wxr/geo-bundle": "dev-master"

$ composer update

AppKernel (1)

        new Sonata\EasyExtendsBundle\SonataEasyExtendsBundle(),

        new WXR\CommonBundle\WXRCommonBundle(),
        new WXR\GeoBundle\WXRGeoBundle(),

SonataEasyExtendsBundle

$ php app/console sonata:easy-extends:generate WXRGeoBundle --dest=src

AppKernel (2)

        new Application\WXR\GeoBundle\ApplicationWXRGeoBundle(),

Routing (optional)

# app/config/routing.yml
wxr_geo:
    resource: "@WXRGeoBundle/Resources/config/routing.yml"
    prefix: /geo

Useful for autocompletion.

Google Map API (optional)

Override SonataAdminBundle::standard_layout.html.twig to import Google Map API.

            <!-- Google Maps API -->
            <script src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&sensor=false"></script>

Latitude and longitude will be automatically retrieved trough geocoding.js.

Configuration

WXRGeoBundle doesn't require any configuration.

Default configuration

wxr_geo:
    translation_domain: WXRGeoBundle
    country:
        manager: wxr_geo.country.manager.default
        admin:
            class: WXR\GeoBundle\Admin\Entity\CountryAdmin
            controller: SonataAdminBundle:CRUD
    region:
        manager: wxr_geo.region.manager.default
        admin:
            class: WXR\GeoBundle\Admin\Entity\RegionAdmin
            controller: SonataAdminBundle:CRUD
    city:
        manager: wxr_geo.city.manager.default
        admin:
            class: WXR\GeoBundle\Admin\Entity\CityAdmin
            controller: SonataAdminBundle:CRUD
    address:
        manager: wxr_geo.address.manager.default
        admin:
            class: WXR\GeoBundle\Admin\Entity\AddressAdmin
            controller: SonataAdminBundle:CRUD

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published