承接 christopherbolt/silverstripe-addressfinderfield 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

christopherbolt/silverstripe-addressfinderfield

Composer 安装命令:

composer require christopherbolt/silverstripe-addressfinderfield

包简介

Save address information based on the AddressFinderNZ API into DataObject fields.

README 文档

README

A custom field for integrating the AddressFinderNZ API as both a backend and frontend field.

AddressFinderField::create(DataObject $data, $name, $title = null, $databaseFields = array(), $hiddenFields = false)

By default the field will pull the full address from the API and will save it into the database field 'Address'.

Alternatively you can specifiy multiple fields from the API to be saved to the database. You can do this by passing in the alternative database fields array as the 3rd variable of the field constructor. The key of the array is the database field and the value should match the meta data returned by the API. https://addressfinder.nz/api/nz/address/metadata

Requirements

This installer requires you have the following:

  • Composer

Configuration

  1. Add your AddressFinderNZ API information to the config.yml:
AddressFinderField:
  Key: 'key-here'
  Secret: 'secret-here'

Usage

  1. Add the database fields to your page or object
private static $db = array(
        'Address' => 'Text'
);
  1. Add the field to your fieldset
AddressFinderField::create($this, 'AddressFinder', 'Search address')

Advanced Usage

  1. Add the multiple database fields to your page or object
private static $db = array(
  'Address' => 'Text',
  'City' => 'Varchar',
  'Street' => 'Varchar'
);
  1. Specify multiple address fields to save to your object NOTE: The key of the array is the database field and the value should match the meta data returned by the API. https://addressfinder.nz/api/nz/address/metadata
$addressConfig = array(
  'Address' => 'a',
  'City' => 'city',
  'Street' => 'street'
);
  1. Add the field to your fieldset
AddressFinderField::create($this, 'AddressFinder', 'Search address', $addressConfig)

Frontend Usage

  1. Add the address field but don't forget to specify the DataObject
AddressFinderField::create($this->data(), 'AddressFinder', 'Address Finder', $addressConfig, false)

统计信息

  • 总下载量: 75
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2018-09-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固