![]() |
Xataface 2.0
Xataface Application Framework
|
Public Member Functions | |
handle (&$params) |
Returns A tree node for for the Record tree menu (displayed in the left column of the Dataface application window. This action is exclusively called by the RecordNavMenu.html template via an HTTPRequest ajax call.
If a relationship is specified then this will output a javascript associative array of objects.
If no relationship is specified then all of the relationships for the found record will be returned in a javascript associative array with the keys of the array being the names of the relationships.
All data returned in JSON format (www.json.org).
Given a url: http://yourdomain.com/path.to.app/index.php?-table=profiles&profileid=10 and assuming that the profiles table has 3 relationships: courses (to the course table), invoices (to the invoice table), and publications (to the pub table). we would obtain output something like: {'courses': { 'course?CourseID=10': {'CourseID': 10, 'CourseTitle': 'Introduction to widgetry', ...}, 'course?CourseID=21': {'CourseID': 21, 'CourseTitle': 'Basics of accounting', ...}, ... }, 'invoices': { 'invoice?InvoiceID=2': {'InvoiceID': 2, 'Amount': 20.32, ... }, 'invoice?InvoiceID=11': {'InvoiceID': 11, 'Amount': 234.89, ...}, ... }, 'publications': { ... } }
Alternatively, if you supplied a url: http://yourdomain.com/path.to.app/index.php?-table=profiles&profileid=10&-relationship=courses Then this action would only output the associative array of objects in the courses relationship. e.g.: { 'course?CourseID=10': {'CourseID': 10, 'CourseTitle': 'Introduction to widgetry', ...}, 'course?CourseID=21': {'CourseID': 21, 'CourseTitle': 'Basics of accounting', ...}, ... }
Definition at line 67 of file ajax_nav_tree_node.php.
handle | ( | &$ | params | ) |
Definition at line 69 of file ajax_nav_tree_node.php.