Documentation

Horde_Core_Ajax_Imple_ContactAutoCompleter extends Horde_Core_Ajax_Imple_AutoCompleter
in package

AbstractYes

JavaScript autocompleter for contacts.

Tags
author

Michael Slusarz slusarz@horde.org

category

Horde

license

http://www.horde.org/licenses/lgpl21 LGPL 2.1

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.
getAddressList()  : Horde_Mail_Rfc822_List
Uses the Registry to expand names.
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.
_getAddressbookSearchParams()  : object
Return search parameters necessary to do a contacts API search.
_getAutoCompleter()  : Horde_Core_Ajax_Imple_AutoCompleter_Base
Get the autocompleter object to use on the browser.
_getAutoCompleterParams()  : array<string|int, mixed>
Return the basic autocompleter parameters.
_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

getAddressList()

Uses the Registry to expand names.

public getAddressList([string $str = '' ][, array<string|int, mixed> $opts = array() ]) : Horde_Mail_Rfc822_List

This function will not search if the address string is empty.

Parameters
$str : string = ''

The name(s) or address(es) to expand.

$opts : array<string|int, mixed> = array()

Additional options:

  • levenshtein: (boolean) Do levenshtein sorting,
  • count_only: (boolean) Only return the count of results.
Return values
Horde_Mail_Rfc822_List

Expand results.

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).

_getAddressbookSearchParams()

Return search parameters necessary to do a contacts API search.

protected abstract _getAddressbookSearchParams() : object
Return values
object

Object with these properties:

  • fields: TODO
  • sources: TODO

_getAutoCompleterParams()

Return the basic autocompleter parameters.

protected _getAutoCompleterParams() : array<string|int, mixed>
Return values
array<string|int, mixed>

Autocompleter parameters.

_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 _handleAutoCompleter(mixed $input) : mixed
Parameters
$input : mixed

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.


        
On this page

Search results