2017 © Pedro Peláez
 

symfony-bundle address-bundle

Symfony2 AddressBundle

image

padam87/address-bundle

Symfony2 AddressBundle

  • Monday, November 14, 2016
  • by Padam87
  • Repository
  • 2 Watchers
  • 10 Stars
  • 13,161 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 7 Forks
  • 2 Open issues
  • 13 Versions
  • 0 % Grown

The README.md

Build Status Coverage Status Scrutinizer Quality Score SensioLabsInsight Latest Stable Version Total Downloads Latest Unstable Version License, (*1)

1, Installation

1.1 Composer

composer require padam87/address-bundle, (*2)

1.2 AppKernel

// app/AppKernel.php
public function registerBundles()
{
    return array(
        // ...
        new Padam87\AddressBundle\Padam87AddressBundle(),
    );
}

2, Usage

Use the traits and embeddables with your schema., (*3)

2.1 Formatter

$formatted = $this->get("padam87.address.formatter")->format($address);

Flags

use Padam87\AddressBundle\Service\FormatterService;

//...

$formatted = $this->get("padam87.address.formatter")->format($address, FormatterService::FLAG_NOBR);

Available flags

  • FLAG_NOBR No linebreak will be added
  • FLAG_HTML Outputs the address in html format

Extend / override templates

You can override or extend the language-specific formats. Just create the appropriate template under app\Resources\Padam87AddressBundle\views, (*4)

example: app\Resources\Padam87AddressBundle\views\US.twig contributing: Create a PR with your own country's format :), (*5)

2.2 Twig extension

{{ address|address()|raw }}

This will output the formatted address, with the FLAG_HTML added by default, (*6)

The Versions

14/11 2016

dev-master

9999999-dev https://github.com/Padam87/AddressBundle

Symfony2 AddressBundle

  Sources   Download

MIT

The Requires

 

The Development Requires

by Adam Prager

address symfony geocode

14/11 2016

v2.0.0

2.0.0.0 https://github.com/Padam87/AddressBundle

Symfony2 AddressBundle

  Sources   Download

MIT

The Requires

 

The Development Requires

by Adam Prager

address symfony geocode

19/12 2013