Datamanager 2 Positioning widget

As with all subclasses, the actual initialization is done in the initialize() function, not in the constructor, to allow for error handling.

It can only be bound to a position type (or subclass thereof), and inherits the configuration from there as far as possible.

Example: 'location' => Array ( 'title' => 'location', 'storage' => null, 'type' => 'org_routamc_positioning_dm2_type', 'widget' => 'org_routamc_positioning_dm2_widget', 'widget_config' => Array ( 'service' => 'geonames', //Possible values are city, geonames ), ),

package org.routamc.positioning

 Methods

_add_coordinates_method_elements ()

_add_map_method_elements ()

_add_place_method_elements ()

_get_city_by_name ($city_name, $results)

Parameters

$city_name

$results

_get_country_list ()

_init_widgets_js_options ()

_on_initialize ()

The initialization event handler post-processes the maxlength setting.

Returns

booleanIndicating Success

_render_country_list ($current)

Parameters

$current

add_elements_to_form ($attributes)

Creates the tab view for all enabled positioning methods Also adds static options to results.

Parameters

$attributes

get_default ()

is_frozen ()

sync_type_with_widget ($results)

Parameters

$results

_get_city_name ()

_render_xep_keys ()

 Properties

 

mixed $_allowed_xep_keys

 

mixed $_countrylist

 

mixed $_main_group

 

mixed $_widget_elements

The group of widgets items as QuickForm elements
 

array $enabled_methods

List of enabled positioning methods Available methods: place, map, coordinates Defaults to all.
 

array $input_defaults

List of defaults used in location inputs key => value pairs (ie.

'country' => 'FI')

 

mixed $js_maxRows

Options to pass to the javascript widget.

Possible values: - (int) maxRows : Maximum amount of results returned. If this is set greater than 1, the widget will show alternative results and lets user to choose the best match. Defaults to: 20 - (int) radius : Radius of the area we search for alternatives. (in Kilometers) Defaults to: 5

 

mixed $js_options

 

mixed $js_options_str

 

mixed $js_radius

 

mixed $service

The service backend to use for searches.

Defaults to geonames

 

array $use_xep_keys

List of additional XEP fields included in location (ie.

'text', 'room')

 

String $_element_id

id of the element