GeoCoords
extends AbstractHelper
in package
GeoCoords view helper
Tags
Table of Contents
- $coords : string
- Default coordinates
- $enabled : bool
- Is Map Search enabled?
- $geoField : string
- Get geoField variable name
- __construct() : mixed
- Constructor
- getSearchUrl() : string|bool
- Get search URL if geo search is enabled for the specified search class ID, false if disabled.
- recommendationEnabled() : bool
- Check if the relevant recommendation module is enabled; if not, there is no point in generating a search link. Note that right now we are assuming it is set up as a default top recommendation; this may need to be made more flexible in future to account for more use cases.
Properties
$coords
Default coordinates
protected
string
$coords
$enabled
Is Map Search enabled?
protected
bool
$enabled
$geoField
Get geoField variable name
protected
string
$geoField
= 'long_lat'
Methods
__construct()
Constructor
public
__construct(string $coords) : mixed
Parameters
- $coords : string
-
Default coordinates
Return values
mixed —getSearchUrl()
Get search URL if geo search is enabled for the specified search class ID, false if disabled.
public
getSearchUrl(Options $options) : string|bool
Parameters
- $options : Options
-
Search options
Return values
string|bool —recommendationEnabled()
Check if the relevant recommendation module is enabled; if not, there is no point in generating a search link. Note that right now we are assuming it is set up as a default top recommendation; this may need to be made more flexible in future to account for more use cases.
protected
recommendationEnabled(array<string|int, mixed> $settings) : bool
Parameters
- $settings : array<string|int, mixed>
-
Recommendation settings