![]() |
Xataface Tagger Module 0.3
Tagging Widget & Tag Cloud component for Xataface
|
An AJAX action to add a tag. More...
Public Member Functions | |
handle ($params) | |
Handles the HTTP request. | |
out ($params) | |
Writes JSON output. |
An AJAX action to add a tag.
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.
{ 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. }
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.
handle | ( | $ | params | ) |
Handles the HTTP request.
Definition at line 56 of file tagger_add_tag.php.
out | ( | $ | params | ) |
Writes JSON output.
array | $params | The datastructure that should be converted to JSON and output. |
Definition at line 219 of file tagger_add_tag.php.