Xataface Tagger Module 0.3
Tagging Widget & Tag Cloud component for Xataface
Public Member Functions
actions_tagger_add_tag Class Reference

An AJAX action to add a tag. More...

Public Member Functions

 handle ($params)
 Handles the HTTP request.
 out ($params)
 Writes JSON output.

Detailed Description

An AJAX action to add a tag.

Parameters:
string-table The name of the source table (that contains the tagger widget).
string-field The name of the field with the tagger widget.
string-value The string that is being added as a tag.
string-src-record-id The xataface record ID of the source record (optional). If this is omitted, then it is assumed that the source record hasn't been created yet (i.e. we are adding a tag on a new record form).

Required method: POST

This action is consumed in the xataface/widgets/tagger.js file: the addTag() function.

Returns:
Object of the form:
 {
            code:  <int>  // The response code -- 200 for success
      message: <string>  // The response message
      label: <string>   // On success the label of the tag.
      recordID: <string>  // The record id of the tag that was added.
 }

Permissions

This action requires the "add new related record" permission to be granted on the field's relationship. If it is not granted, then this will return an error code (in the JSON return structure).

Definition at line 52 of file tagger_add_tag.php.


Member Function Documentation

handle ( params)

Handles the HTTP request.

Definition at line 56 of file tagger_add_tag.php.

out ( params)

Writes JSON output.

Parameters:
array$paramsThe datastructure that should be converted to JSON and output.

Definition at line 219 of file tagger_add_tag.php.


The documentation for this class was generated from the following file:
 All Data Structures Files Functions