SilverWare\Google\Maps\Components\GoogleMapComponent
An extension of the base component for a Google map component.
- Author: Colin Tucker <colin@praxis.net.au>
- Copyright: 2018 Praxis Interactive
- License: https://opensource.org/licenses/BSD-3-Clause BSD-3-Clause
Synopsis
class GoogleMapComponent
extends BaseComponent
{
- // constants
- const TYPE_ROADMAP = 'roadmap';
- const TYPE_SATELLITE = 'satellite';
- const TYPE_HYBRID = 'hybrid';
- const TYPE_TERRAIN = 'terrain';
- const HEIGHT_AUTO = 'auto';
- const HEIGHT_MANUAL = 'manual';
- // members
- private static string $singular_name = 'Google Map Component';
- private static string $plural_name = 'Google Map Components';
- private static string $description = 'A component which shows a Google map';
- private static string $icon = 'silverware/google-maps: admin/client/dist/images/icons/GoogleMapComponent.png';
- private static string $table_name = 'SilverWare_GoogleMapComponent';
- private static string $hide_ancestor = BaseComponent::class;
- private static array|string $allowed_children = 'none';
- private static array $db = ;
- private static array $has_many = ;
- private static array $defaults = ;
- private static array $casting = ;
- private static integer $default_pixel_height = 400;
- // methods
- public FieldList getCMSFields()
- public RequiredFields getCMSValidator()
- public array fieldLabels()
- public array getClassNames()
- public array getWrapperClassNames()
- public array getMapClassNames()
- public array getMapAttributes()
- public array getMapDataAttributes()
- public ArrayList getAllMarkers()
- public Marker getLocationMarker()
- public string getLocationMarkerTitle()
- public string getLocationMarkerLabel()
- public string getLocationMarkerContent()
- public string getMarkersJSON()
- public string getMapAttributesHTML()
- public string getMapID()
- public string getHeightManualCSS()
- public boolean isManualHeightMode()
- public boolean isDisabled()
- public array getHeightModeOptions()
- public array getMapTypeOptions()
- public array getZoomOptions()
Hierarchy
Extends
- SilverWare\Components\BaseComponent
Constants
Name | Value |
---|---|
TYPE_ROADMAP | 'roadmap' |
TYPE_SATELLITE | 'satellite' |
TYPE_HYBRID | 'hybrid' |
TYPE_TERRAIN | 'terrain' |
HEIGHT_AUTO | 'auto' |
HEIGHT_MANUAL | 'manual' |
Members
private
- $allowed_children
—
SilverWare\Google\Maps\Components\array|string
Defines the allowed children for this object. - $casting
—
array
Maps field and method names to the class names of casting objects. - $db
—
array
Maps field names to field types for this object. - $default_pixel_height
—
integer
Defines the default pixel height for manual height mode. - $defaults
—
array
Defines the default values for the fields of this object. - $description
—
string
Description of this object. - $has_many
—
array
Defines the has-many associations for this object. - $hide_ancestor
—
string
Defines an ancestor class to hide from the admin interface. - $icon
—
string
Icon file for this object. - $plural_name
—
string
Human-readable plural name. - $singular_name
—
string
Human-readable singular name. - $table_name
—
string
Defines the table name to use for this object.
Methods
public
- fieldLabels() — Answers the labels for the fields of the receiver.
- getAllMarkers() — Answers a list of all markers for the map.
- getCMSFields() — Answers a list of field objects for the CMS interface.
- getCMSValidator() — Answers a validator for the CMS interface.
- getClassNames() — Answers an array of class names for the HTML template.
- getHeightManualCSS() — Answers the manual height CSS.
- getHeightModeOptions() — Answers an array of options for the height mode field.
- getLocationMarker() — Answers a map marker for the map location.
- getLocationMarkerContent() — Answers the content for the location marker.
- getLocationMarkerLabel() — Answers the label for the location marker.
- getLocationMarkerTitle() — Answers the title for the location marker.
- getMapAttributes() — Answers an array of attributes for the map element.
- getMapAttributesHTML() — Answers a string of attributes for the map element.
- getMapClassNames() — Answers an array of map class names for the HTML template.
- getMapDataAttributes() — Answers an array of data attributes for the map element.
- getMapID() — Answers the map element ID for the template.
- getMapTypeOptions() — Answers an array of options for the map type field.
- getMarkersJSON() — Answers a JSON-encoded string containing the markers for the map.
- getWrapperClassNames() — Answers an array of wrapper class names for the HTML template.
- getZoomOptions() — Answers an array of options for the zoom field.
- isDisabled() — Answers true if the object is disabled within the template.
- isManualHeightMode() — Answers true if the height mode is set to manual.