gertvdb / location
Provide a standard way to store a location
Installs: 21
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:drupal-module
Requires
- gertvdb/coordinates: ^8.1
- gertvdb/iso3166: ^8.1
Requires (Dev)
- drupal/coder: 8.3.1
- drupal/core: ^8.8
- jakub-onderka/php-parallel-lint: ^1.0
- mockery/mockery: ^1.3
- phpmd/phpmd: 2.7.0
- phpunit/phpunit: ^6.5
- squizlabs/php_codesniffer: ^3.4
This package is auto-updated.
Last update: 2024-11-29 06:03:48 UTC
README
Provide a standard way to store a location and work with it.
Usage
Initialising the classes.
use Drupal\location\Location;
use Drupal\location\LocationCollection;
use Drupal\country\Country;
use Drupal\continent\Continent;
$country = new Country('US');
$continent = new Continent('NA');
$coordinate = new Coordinate(37.419857, -122.078827);
$location = new Location(
'Google Inc.',
'Second floor',
'Amphitheatre Parkway',
1600,
'B2',
'94043',
'Mountain View',
'San Francisco',
'California',
$country,
$continent,
$coordinate
);
$collection = new LocationCollection([$location]);
Release notes
1.0.0
- Basic setup of the module.
- Provide location and location collection class.