\MapBlock
- Author: Donatas Navidonskis <donatas@navidonskis.com>
Synopsis
class MapBlock
extends BaseBlock
{
- // members
- private static array $db = ;
- private static array $has_many = ;
- private static array $has_one = ;
- private static string|null $map_styles = NULL;
- private static bool $load_javascript = true;
- // Inherited members from BaseBlock
- protected static string $upload_directory;
- // methods
- public string singular_name()
- public string plural_name()
- public array getCoordinatesAsOption()
- public FieldList getCMSFields()
- public HTMLText forTemplate()
- public bool|string getMarkersAsJson()
- public bool|string getOptionsAsJson()
- // Inherited methods from BaseBlock
- public HTMLText isPublishedIcon()
- public string forTemplate()
- public bool|string Link()
- public string getUploadDirectory()
- public string getBlockName()
Hierarchy
Extends
Members
private
- $db — array
- $has_many — array
- $has_one — array
- $load_javascript
—
bool
This will load javascript dependency to initialize user client map element. - $map_styles
—
string|null
Google Maps styles in string of JSON format. See docs/GOOGLE_MAPS_BLOCK.md how to use it.
protected
- $upload_directory
—
string
Default directory to upload your files.
Methods
public
- forTemplate()
- getCMSFields()
- getCoordinatesAsOption()
- getMarkersAsJson()
- getOptionsAsJson()
- plural_name()
- singular_name()
Inherited from BaseBlock
public
- Link()
- forTemplate() — Renders this block with appropriate templates looks for templates that match BlockClassName_AreaName falls back to BlockClassName.
- getBlockName()
- getUploadDirectory()
- isPublishedIcon() — Re-add (un)publish images.