happyr/location-bundle

A Symfony2 Bundle to handle geographic location of your entities

Installs: 294

Dependents: 0

Stars: 1

Watchers: 3

Language: PHP

0.3.0 2014-12-04 12:42 UTC

README

A Symfony2 Bundle to handle location

Installation

  1. Install with composer:

    php composer.phar require happyr/location-bundle
    
  2. Enable the bundle:

// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new Happyr\LocationBundle\HappyRLocationBundle(),
    );
}

Usage

//any form 
public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder
            ->add('location', 'location', array(
                    'components'=>array(
                        'country'=>true,
                        'city'=>true,
                    )
                ));
    }