PHP Class IMP_Ajax_Application_Handler_Dynamic, horde

Author: Michael Slusarz ([email protected])
Inheritance: extends Horde_Core_Ajax_Application_Handler
Datei anzeigen Open project: horde/horde

Protected Properties

Property Type Description
$_readOnly array The list of actions that require readonly access to the session.

Public Methods

Method Description
addAttachmentCkeditor ( ) : Horde_Core_Ajax_Response_Raw AJAX action: Add an attachment to a compose message (from the ckeditor plugin).
addContact ( ) : boolean AJAX action: Add contact.
addressHeader ( ) : object AJAX action: Return a list of address objects used to build an address header for a message.
autocompleteSearch ( ) : object AJAX Action: Do an autocomplete search.
blacklist ( ) : boolean AJAX action: Blacklist/whitelist addresses from messages.
createFlag ( ) : object AJAX action: Create an IMAP flag.
createMailbox ( ) : boolean AJAX action: Create a mailbox.
createMailboxPrepare ( ) : object AJAX action: Check access rights for creation of a submailbox.
deleteAttach ( ) : array AJAX action: Delete an attachment from compose data.
deleteMailbox ( ) : boolean AJAX action: Delete a mailbox.
deleteMailboxPrepare ( ) : object AJAX action: Check access rights for deletion/rename of mailbox.
dynamicInit ( ) : boolean AJAX action: Initialize dynamic view.
emptyMailbox ( ) : boolean AJAX action: Empty a mailbox.
emptyMailboxPrepare ( ) : object AJAX action: Check access rights for a mailbox, and provide number of messages to be emptied.
flagAll ( ) : boolean AJAX action: Flag all messages in a mailbox.
flagMessages ( ) : boolean AJAX action: Flag messages.
getContactsImage ( ) : object AJAX action: Return the contacts images for a given e-mail address.
html2Text ( ) : object AJAX action: Convert HTML to text (compose data).
importMailbox ( ) : object AJAX action: Import a mailbox.
inlineMessageOutput ( ) : object AJAX action: Return the inline display text for a given MIME ID of a message.
isFixedMbox ( ) : object AJAX action: Is the given mailbox fixed? Called dynamically to delay retrieval of ACLs of all visible mailboxes at initialization.
listMailboxes ( ) : boolean AJAX action: List mailboxes.
mailboxSize ( ) : object AJAX action: Determine the size of a mailbox.
messageMimeTree ( ) : mixed AJAX action: Return the MIME tree representation of the message.
modifyPoll ( ) : mixed AJAX action: Modify list of polled mailboxes.
newFilter ( ) : Horde_Core_Ajax_Response_HordeCore_Reload AJAX action: Redirect to the filter edit page and pre-populate with an e-mail address.
purgeDeleted ( ) : boolean AJAX action: Purge deleted messages.
renameMailbox ( ) : boolean AJAX action: Rename a mailbox.
sendMDN ( ) : mixed AJAX action: Send a Message Disposition Notification (MDN).
sentMailList ( ) : object AJAX action: Generate the sent-mail select list.
stripAttachment ( ) : mixed AJAX action: strip attachment.
subscribe ( ) : boolean AJAX action: [un]Subscribe to a mailbox.
text2Html ( ) : object AJAX action: Convert text to HTML (compose data).

Protected Methods

Method Description
_convertText ( $mode ) Helper for html2Text() and text2Html().

Method Details

_convertText() protected method

Helper for html2Text() and text2Html().
protected _convertText ( $mode )

addAttachmentCkeditor() public method

Variables used: - CKEditorFuncNum: (integer) CKEditor function identifier to call when returning URL data - composeCache: (string) The IMP_Compose cache identifier.
public addAttachmentCkeditor ( ) : Horde_Core_Ajax_Response_Raw
return Horde_Core_Ajax_Response_Raw text/html return containing javascript code to update the URL parameter in CKEditor.

addContact() public method

Variables used: - addr: (string) [JSON array] Address list.
public addContact ( ) : boolean
return boolean True on success, false on failure.

addressHeader() public method

See the list of variables needed for IMP_Ajax_Application#changed() and IMP_Ajax_Application#checkUidvalidity(). Mailbox/indices form parameters needed. Additional variables used: - header: (string) The header to return.
public addressHeader ( ) : object
return object An object with the following entries: - hdr_data: (object) Contains header names as keys and lists of address objects as values.

autocompleteSearch() public method

Variables used: - limit: (integer) If set, limits to this many results. - search: (string) Search string. - type: (string) Autocomplete search type.
public autocompleteSearch ( ) : object
return object An object with a single property: 'results'. The format of 'results' depends on the search type. - type = 'email' Results is an array with the following keys for each result: - g: (array) List of addresses in the group (in same 'results' format as type = 'email'). - l: (string) Full label. - s: (string) Short display string. - v: (string) Value.

blacklist() public method

See the list of variables needed for IMP_Ajax_Application#changed(), IMP_Ajax_Application#deleteMsgs(), and IMP_Ajax_Application#checkUidvalidity(). Mailbox/indices form parameters needed. Additional variables used: - blacklist: (integer) 1 to blacklist, 0 to whitelist.
public blacklist ( ) : boolean
return boolean True on success.

createFlag() public method

Variables used: - flagcolor: (string) Background color for flag label. - flagname: (string) Flag name.
public createFlag ( ) : object
return object An object with the following properties: - success: (boolean) True if successful.

createMailbox() public method

Variables used: - create_poll: (boolean) If true, add new mailbox to poll list. - mbox: (string) The name of the new mailbox. - parent: (string) The parent mailbox (base64url encoded).
public createMailbox ( ) : boolean
return boolean True on success, false on failure.

createMailboxPrepare() public method

Variables used: - mbox: (string) The name of the mailbox to check (base64url encoded).
public createMailboxPrepare ( ) : object
return object Object with the following properties: - result: (boolean) True if submailboxes can be created.

deleteAttach() public method

Variables used: - atc_indices: (string) [JSON array] Attachment IDs to delete. - imp_compose: (string) The IMP_Compose cache identifier. - quiet: (boolean) If true, don't output notifications.
public deleteAttach ( ) : array
return array The list of attchment IDs that were deleted.

deleteMailbox() public method

Variables used: - container: (boolean) True if base element is a container. - mbox: (string) The full mailbox name to delete (base64url encoded). - subfolders: (boolean) Delete all subfolders?
public deleteMailbox ( ) : boolean
return boolean True on success, false on failure.

deleteMailboxPrepare() public method

Variables used: - mbox: (string) The name of the mailbox to check (base64url encoded). - type: (string) Either 'delete' or 'rename'.
public deleteMailboxPrepare ( ) : object
return object Object with the following properties: - result: (boolean) True if mailbox can be deleted/renamed.

dynamicInit() public method

AJAX action: Initialize dynamic view.
See also: listMailboxes()
public dynamicInit ( ) : boolean
return boolean True.

emptyMailbox() public method

Variables used: - mbox: (string) The full mailbox name to empty (base64url encoded).
public emptyMailbox ( ) : boolean
return boolean True on success, false on failure.

emptyMailboxPrepare() public method

Variables used: - mbox: (string) The name of the mailbox to check (base64url encoded).
public emptyMailboxPrepare ( ) : object
return object Object with the following properties: - result: (integer) The number of messages to be deleted.

flagAll() public method

Variables used: - add: (integer) Add the flags? - flags: (string) The IMAP flags to add/remove (JSON serialized array). - mbox: (string) The full mailbox name (base64url encoded).
public flagAll ( ) : boolean
return boolean True on success, false on failure.

flagMessages() public method

See the list of variables needed for IMP_Ajax_Application#changed() and IMP_Ajax_Application#checkUidvalidity(). Mailbox/indices form parameters needed. Additional variables used: - add: (integer) Set the flag? - flags: (string) The flags to set (JSON serialized array).
public flagMessages ( ) : boolean
return boolean True on success, false on failure.

getContactsImage() public method

Variables used: - addr: (string) The e-mail address.
public getContactsImage ( ) : object
return object An object with the following properties: - avatar: (string) The URL of the avatar image. - flag: (string) The URL of the sender's country flag image. - flagname: (string) The name of the country of the sender.

html2Text() public method

Variables used: - data: (string) [JSON array] List of data to convert. Keys are UIDs used to idetify the return values. Values are arrays with these keys: - changed: (integer) Has the text changed from the original? - text: (string) The text to convert. - imp_compose: (string) The IMP_Compose cache identifier.
public html2Text ( ) : object
return object An object with the following entries: - text: (array) Array with keys as UIDs and values as the converted text string.

importMailbox() public method

Variables used: - import_mbox: (string) The mailbox to import into (base64url encoded).
public importMailbox ( ) : object
return object Returns response object to display JSON HTML-encoded: - action: (string) The action name (importMailbox). - mbox: (string) The mailbox the messages were imported to (base64url encoded).

inlineMessageOutput() public method

See the list of variables needed for IMP_Ajax_Application#changed() and IMP_Ajax_Application#checkUidvalidity(). Mailbox/indices form parameters needed. Additional variables used: - mimeid: (string) The MIME ID to return.
public inlineMessageOutput ( ) : object
return object An object with the following entries:
  - md: (array) Metadata information.
  - mimeid: (string) The base MIME ID of the text.
  - puids: (array) See IMP_Ajax_Application#previewUids().
  - text: (string) Inline Message text of the part.

isFixedMbox() public method

Variables used: - mbox: (integer) The mailbox name.
public isFixedMbox ( ) : object
return object An object with the following entires: - fixed: (boolean) True if the mailbox is fixed.

listMailboxes() public method

Variables used: - all: (integer) 1 to show all mailboxes. - base: (string) The base mailbox. - expall: (boolean) 1 to expand all (requires 'all'). - initial: (string) 1 to indicate the initial request for mailbox list. - mboxes: (string) The list of mailboxes to process (JSON encoded array; mailboxes are base64url encoded). - reload: (integer) 1 to force reload of mailboxes. - unsub: (integer) 1 to show unsubscribed mailboxes.
public listMailboxes ( ) : boolean
return boolean True.

mailboxSize() public method

Variables used: - mbox: (string) The name of the mailbox to check (base64url encoded).
public mailboxSize ( ) : object
return object An object with the following properties: - size: (string) Formatted size string.

messageMimeTree() public method

See the list of variables needed for IMP_Ajax_Application#changed() and IMP_Ajax_Application#checkUidvalidity(). Mailbox/indices form parameters needed. Additional variables used: - preview: (integer) If set, return preview data. Otherwise, return full data.
public messageMimeTree ( ) : mixed
return mixed On error will return null. Otherwise an object with the following entries: - tree: (string) The MIME tree representation of the message. If viewing preview, on error this object will contain error and errortype properties.

modifyPoll() public method

Variables used: - add: (integer) 1 to add to the poll list, 0 to remove. - mbox: (string) The full mailbox name to modify (base64url encoded).
public modifyPoll ( ) : mixed
return mixed False on failure, or an object with the following entries: - add: (integer) 1 if added to the poll list, 0 if removed. - mbox: (string) The full mailbox name modified.

newFilter() public method

Requires EITHER 'addr' -or- mailbox/indices from form params. Variables used: - addr: (string) The e-mail address to use.
public newFilter ( ) : Horde_Core_Ajax_Response_HordeCore_Reload
return Horde_Core_Ajax_Response_HordeCore_Reload Object with URL to redirect to.

purgeDeleted() public method

See the list of variables needed for IMP_Ajax_Application#deleteMsgs().
public purgeDeleted ( ) : boolean
return boolean True on success.

renameMailbox() public method

Variables used: - new_name: (string) New mailbox name (child node) (UTF-8). - new_parent: (string) New parent name (UTF-8; base64url encoded). If not present, uses old parent. - old_name: (string) Full name of old mailbox (base64url encoded).
public renameMailbox ( ) : boolean
return boolean True on success, false on failure.

sendMDN() public method

Mailbox/indices form parameters needed.
public sendMDN ( ) : mixed
return mixed False on failure, or an object with these properties:
  - puids: (array) See IMP_Ajax_Application#previewUids().

sentMailList() public method

Variables used: NONE
public sentMailList ( ) : object
return object An object with the following properties: - flist: (array) TODO

stripAttachment() public method

See the list of variables needed for IMP_Ajax_Application#changed() and IMP_Ajax_Application#checkUidvalidity(). Mailbox/indices form parameters needed.
public stripAttachment ( ) : mixed
return mixed False on failure, or an object with these properties:
  - puids: (array) See IMP_Ajax_Application#previewUids(). Contains a
           list of new mailbox/UID values.

subscribe() public method

Variables used: - mbox: (string) The full mailbox name to [un]subscribe to (base64url encoded). - sub: (integer) 1 to subscribe, empty to unsubscribe. - subfolders: (boolean) [Un]subscribe to all subfolders?
public subscribe ( ) : boolean
return boolean True on success, false on failure.

text2Html() public method

Variables used: - data: (string) [JSON array] List of data to convert. Keys are UIDs used to idetify the return values. Values are arrays with these keys: - changed: (integer) Has the text changed from the original? - text: (string) The text to convert. - imp_compose: (string) The IMP_Compose cache identifier.
public text2Html ( ) : object
return object An object with the following entries: - text: (array) Array with keys as UIDs and values as the converted text string.

Property Details

$_readOnly protected_oe property

The list of actions that require readonly access to the session.
protected array $_readOnly
return array