gertvdb/location

提供一个存储位置的标准化方法

安装: 21

依赖项: 0

建议者: 0

安全性: 0

星标: 0

关注者: 2

分支: 0

开放问题: 0

类型:drupal-module

8.1.2 2020-10-30 07:48 UTC

This package is auto-updated.

Last update: 2024-09-29 05:29:05 UTC


README

提供一个存储位置的标准方式,并与之交互。

用法

初始化类。


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]);

发行说明

1.0.0

  • 模块的基本设置。
  • 提供位置和位置集合类。