PHP 클래스 Carbon_Fields\Field\Map_Field

Allows to manually select a pin, or to position a pin based on a specified address. Coords (lat, lng), address and zoom are saved in the database.
상속: extends Field
파일 보기 프로젝트 열기: htmlburger/carbon-fields

보호된 프로퍼티들

프로퍼티 타입 설명
$address string Current address.
$default_lat float Default latitude.
$default_lng float Default longitude.
$default_zoom integer Default zoom.
$lat float | string Current latitude.
$lazyload boolean Whether to lazy load this field.
$lng float | string Current longitude.
$zoom integer Current zoom.

공개 메소드들

메소드 설명
admin_enqueue_scripts ( ) Enqueue scripts in the administration
load ( ) Load data from the datastore.
save ( ) Save data to the datastore.
set_position ( string $lat, string $lng, integer $zoom ) Set the coords and zoom of this field.
set_value_from_input ( array $input = null ) Load the field value from an input array based on it's name
template ( ) Underscore template of this field.
to_json ( boolean $load ) : array Returns an array that holds the field data, suitable for JSON representation.

메소드 상세

admin_enqueue_scripts() 공개 정적인 메소드

Enqueue scripts in the administration
public static admin_enqueue_scripts ( )

load() 공개 메소드

Manually set the map field data fragments.
public load ( )

save() 공개 메소드

Manually save the map field data fragments.
public save ( )

set_position() 공개 메소드

Set the coords and zoom of this field.
public set_position ( string $lat, string $lng, integer $zoom )
$lat string Latitude
$lng string Longitude
$zoom integer Zoom level

set_value_from_input() 공개 메소드

Load the field value from an input array based on it's name
public set_value_from_input ( array $input = null )
$input array (optional) Array of field names and values. Defaults to $_POST

template() 공개 메소드

Underscore template of this field.
public template ( )

to_json() 공개 메소드

This data will be available in the Underscore template and the Backbone Model.
public to_json ( boolean $load ) : array
$load boolean Should the value be loaded from the database or use the value from the current instance.
리턴 array

프로퍼티 상세

$address 보호되어 있는 프로퍼티

Current address.
protected string $address
리턴 string

$default_lat 보호되어 있는 프로퍼티

Default latitude.
protected float $default_lat
리턴 float

$default_lng 보호되어 있는 프로퍼티

Default longitude.
protected float $default_lng
리턴 float

$default_zoom 보호되어 있는 프로퍼티

Default zoom.
protected int $default_zoom
리턴 integer

$lat 보호되어 있는 프로퍼티

Current latitude.
protected float|string $lat
리턴 float | string

$lazyload 보호되어 있는 프로퍼티

Whether to lazy load this field.
protected bool $lazyload
리턴 boolean

$lng 보호되어 있는 프로퍼티

Current longitude.
protected float|string $lng
리턴 float | string

$zoom 보호되어 있는 프로퍼티

Current zoom.
protected int $zoom
리턴 integer