Download the PHP package daa/addressable-bundle without Composer

On this page you can find all versions of the php package daa/addressable-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package addressable-bundle

Build Status

Symfony Addressable Bundle

This is a Symfony bundle which facilitates making entities addressable and geo location aware.

It includes a google map form type to search for and set addresses (with lat/lng), and a geo spatial service to ease calculating distances, sorting and filtering within a radius, etc using these objects with latitude and longitude.

Installation Symfony 5/6

Add the following to composer.json:

Register the bundle in your config/bundles.php:

Include the twig template for the type layout in config/packages/twig.yml

Installation Symfony 2/3

Add the following to composer.json:

Register the bundle in your app/AppKernel.php:

Include the twig template for the type layout in app/config/config.yml

Usage

Now your entity or document must:

  1. implement the included AddressableInterface
  2. use the relevant trait (ORM or PHPCR version) or manually reproduce the required fields, getters and setters

Note, if you are using an older version of PHP which does not support traits, then you are forced to copy the trait code manually into your entity.

Once your entity is setup, we can add the address map selector to your forms in the following ways:

Note: if using address as a child or relation remember to set the 'data_class' options pointing to the Address object.

Options

We can override several options:

Country Features

If you use "country" type (Symfony\Component\Form\Extension\Core\Type\CountryType) for the "country_field" the geospatial helper uses googles returned shortcode to populate the country short code in the dropdown

Further Customization

If you don't want the bundle to use it's own script you can override the address_map_scripts block to be empty; and then simply copy and paste the javascript in vendor/daa/addressable-bundle/Resources/public/js/address_map.js to your own js files.

To add additional functionality after address updates, simply override the block address_map_callback and extend to add the additional functionality (or make it empty and define var gmap_callback in your js code).

Screenshot

Sonata implementation:

View screenshot

Geospatial Helper Service

From your controller you can get the the addressable_bundle.geospatial_helper service; from anywhere else you can instantiate the GeospatialHelper class directly.

Examples:


All versions of addressable-bundle with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4
symfony/form Version >3.0
symfony/http-kernel Version >3.0
symfony/dependency-injection Version >3.0
symfony/config Version >3.0
symfony/validator Version >3.0
symfony/options-resolver Version >3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package daa/addressable-bundle contains the following files

Loading the files please wait ....