Documentation

MapDirectionsWidget extends Widget
in package

Displays a google map

Table of Contents

Properties

$default_settings  : mixed
Array of default settings for new widgets
$friendly_desc  : mixed
A description, for display in the admin
$friendly_name  : mixed
The friendly name, for display in the admin
$heading  : mixed
Optional HTML H2 heading that's rendered on front-end view
$settings  : mixed
Settings - These get automatically set in the admin and loaded on the front-end

Methods

cleanupSettings()  : void
Run after import of settings, allows extending widgets to clean up settings which may have bad values for some reason
getDefaultSettings()  : mixed
Returns the default settings for the widget
getEditUrl()  : mixed
This function should return a URL which can be used to edit the *content* which is displayed by this widget.
getFriendlyDesc()  : mixed
Gets the english name of this widget
getFriendlyName()  : mixed
Gets the english name of this widget
getInfoLabels()  : mixed
Returns a label which describes the contents of this widget See {@link Widget::get_info_label} for full documentation
getNotAvailableReason()  : mixed
Is there sufficent content to add this addon at the moment? If this widget is not available, a string message should be returned If this widget *is* available, NULL should be returned.
getSettings()  : array<string|int, mixed>
Return the currently loaded settings for the widget
getSettingsForm()  : string
Return the settings form for this widget
getTitle()  : mixed
Returns the title to use for the widget - should not contain HTML
importSettings()  : mixed
Imports the settings
render()  : string
Return the front-end view of this widget
setTitle()  : void
Set widget title

Properties

$default_settings

Array of default settings for new widgets

protected mixed $default_settings = []

$friendly_desc

A description, for display in the admin

protected mixed $friendly_desc = 'A dynamic Google map, with directions'

$friendly_name

The friendly name, for display in the admin

protected mixed $friendly_name = "Map w/ Directions"

$heading

Optional HTML H2 heading that's rendered on front-end view

protected mixed $heading = ''

$settings

Settings - These get automatically set in the admin and loaded on the front-end

protected mixed $settings = []

Methods

cleanupSettings()

Run after import of settings, allows extending widgets to clean up settings which may have bad values for some reason

public cleanupSettings() : void

getDefaultSettings()

Returns the default settings for the widget

public final getDefaultSettings() : mixed

getEditUrl()

This function should return a URL which can be used to edit the *content* which is displayed by this widget.

public getEditUrl() : mixed

Most widgets show content using a category selection box; the URL should in that case direct the user to the contents list for that category.

Return NULL if there isn't an appropriate URL to use.

getFriendlyDesc()

Gets the english name of this widget

public getFriendlyDesc() : mixed

getFriendlyName()

Gets the english name of this widget

public getFriendlyName() : mixed

getInfoLabels()

Returns a label which describes the contents of this widget See {@link Widget::get_info_label} for full documentation

public getInfoLabels() : mixed

getNotAvailableReason()

Is there sufficent content to add this addon at the moment? If this widget is not available, a string message should be returned If this widget *is* available, NULL should be returned.

public getNotAvailableReason() : mixed

getSettings()

Return the currently loaded settings for the widget

public getSettings() : array<string|int, mixed>
Return values
array<string|int, mixed> —

The widget settings

getSettingsForm()

Return the settings form for this widget

public getSettingsForm() : string
Return values
string —

The output HTML.

getTitle()

Returns the title to use for the widget - should not contain HTML

public getTitle() : mixed

importSettings()

Imports the settings

public importSettings(array<string|int, mixed> $settings) : mixed
Parameters
$settings : array<string|int, mixed>

The widget settings

render()

Return the front-end view of this widget

public render(int $orientation) : string
Parameters
$orientation : int

The orientation of the widget.

Return values
string —

The output HTML.

setTitle()

Set widget title

public setTitle(string $str) : void
Parameters
$str : string

Widget title (heading)

On this page

Search results