Horde_Core_Ajax_Imple_WeatherLocationAutoCompleter_Base
extends Horde_Core_Ajax_Imple_AutoCompleter
in package
Base class Imple to provide weather/location autocompletion.
Copyright 2011-2017 Horde LLC (http://www.horde.org/)
See the enclosed file LICENSE for license information (GPL). If you did not receive this file, see http://www.horde.org/licenses/gpl.
Tags
Table of Contents
Properties
- $_auth : bool
- Does this imple require authentication?
- $_domid : int
- DOM ID incrementer. Shared by all Imple instances.
- $_init : bool
- Has this imple been initialized?
- $_initAc : bool
- Since this is shared code, we need to keep global init status here.
- $_observe : string
- The javascript event to observe.
- $_params : array<string|int, mixed>
- Parameters needed by the subclasses.
Methods
- __construct() : mixed
- Constructor.
- attach() : mixed
- Attach the object to a javascript event.
- getDomId() : string
- Return the DOM ID this Imple is attached to.
- getImpleUrl() : Horde_Url
- The URL to the imple AJAX endpoint. This should only be used if the javascript code.
- handle() : mixed
- Imple handler.
- _attach() : mixed
- Attach the object to a javascript event.
- _getAutoCompleter() : Horde_Core_Ajax_Imple_AutoCompleter_Base
- Get the autocompleter object to use on the browser.
- _getAutoCompleterForBlock() : Horde_Core_Ajax_Imple_AutoCompleter_Ajax
- _handle() : mixed
- Imple handler.
- _handleAutoCompleter() : mixed
- Do the auto-completion on the server.
- _impleParams() : array<string|int, mixed>
- Add the necessary parameters to the imple AJAX request.
- _jsOnComplete() : mixed
- Javascript code to run on a successful AJAX response.
- _jsOnDoAction() : mixed
- Javascript code to run before the action is sent to the AJAX endpoint.
Properties
$_auth
Does this imple require authentication?
protected
bool
$_auth
= \true
$_domid
DOM ID incrementer. Shared by all Imple instances.
protected
static int
$_domid
= 0
$_init
Has this imple been initialized?
protected
bool
$_init
= \false
$_initAc
Since this is shared code, we need to keep global init status here.
protected
static bool
$_initAc
= \false
$_observe
The javascript event to observe.
protected
string
$_observe
= 'click'
$_params
Parameters needed by the subclasses.
protected
array<string|int, mixed>
$_params
= array()
Methods
__construct()
Constructor.
public
__construct([array<string|int, mixed> $params = array() ]) : mixed
Parameters
- $params : array<string|int, mixed> = array()
-
Configuration parameters:
- id: (string) [OPTIONAL] The DOM ID to attach to.
attach()
Attach the object to a javascript event.
public
attach() : mixed
getDomId()
Return the DOM ID this Imple is attached to.
public
getDomId() : string
Return values
string —DOM ID.
getImpleUrl()
The URL to the imple AJAX endpoint. This should only be used if the javascript code.
public
final getImpleUrl() : Horde_Url
Return values
Horde_Url —URL to the AJAX endpoint.
handle()
Imple handler.
public
handle(Horde_Variables $vars) : mixed
Parameters
- $vars : Horde_Variables
-
A variables object.
Return values
mixed —Data to return to the browser.
_attach()
Attach the object to a javascript event.
protected
_attach(mixed $init) : mixed
Parameters
- $init : mixed
-
Is this the first time this imple has been initialized?
Return values
mixed —An array of javascript parameters. If false, the imple handler will ignore this instance (calling code will be responsible for calling imple endpoint).
_getAutoCompleter()
Get the autocompleter object to use on the browser.
protected
abstract _getAutoCompleter() : Horde_Core_Ajax_Imple_AutoCompleter_Base
Return values
Horde_Core_Ajax_Imple_AutoCompleter_Base —The autocompleter object to use.
_getAutoCompleterForBlock()
protected
_getAutoCompleterForBlock(string $block) : Horde_Core_Ajax_Imple_AutoCompleter_Ajax
Parameters
- $block : string
-
The block type containing this autocompleter.
Return values
Horde_Core_Ajax_Imple_AutoCompleter_Ajax_handle()
Imple handler.
protected
_handle(Horde_Variables $vars) : mixed
Parameters
- $vars : Horde_Variables
-
A variables object.
Return values
mixed —Data to return to the browser.
_handleAutoCompleter()
Do the auto-completion on the server.
protected
abstract _handleAutoCompleter(string $input) : mixed
Parameters
- $input : string
-
Input received from the browser.
Return values
mixed —Raw data to return to the javascript code.
_impleParams()
Add the necessary parameters to the imple AJAX request.
protected
final _impleParams() : array<string|int, mixed>
Return values
array<string|int, mixed> —URL parameter hash.
_jsOnComplete()
Javascript code to run on a successful AJAX response.
protected
_jsOnComplete(string $js) : mixed
e.memo contains the AJAX response.
Parameters
- $js : string
-
JS code to run.
_jsOnDoAction()
Javascript code to run before the action is sent to the AJAX endpoint.
protected
_jsOnDoAction(string $js) : mixed
e.memo contains the list of URL parameters.
Parameters
- $js : string
-
JS code to run.