pastvne
Bruce Decker
I've been experimenting with a script to read a Fabrik List from a external script. I've been able to get this to work:
JModel::addIncludePath(JPATH_SITE . '/components/com_fabrik/models');
$listModel = JModel::getInstance('List', 'FabrikFEModel');
$listModel->setId(37);
$data = $listModel->getData();
var_dump($data);
I $data is a array of 10 records from list 37. But, now I'd like to be able to read specific record from this list. Actually, I'd like to issue a query against this list and return a object containing the record's data. I can do this directly with PHP and MySQL but I'd really like to read using the Fabrik API so that if I attempt to read a record excluded by prefilter, I'd be able to tell.
I've looked through the /models/list.php and I see getData but it is unclear to me if there is a way to issue a query against this list using the Fabrik API. Any advice would be greatly appreciated.
JModel::addIncludePath(JPATH_SITE . '/components/com_fabrik/models');
$listModel = JModel::getInstance('List', 'FabrikFEModel');
$listModel->setId(37);
$data = $listModel->getData();
var_dump($data);
I $data is a array of 10 records from list 37. But, now I'd like to be able to read specific record from this list. Actually, I'd like to issue a query against this list and return a object containing the record's data. I can do this directly with PHP and MySQL but I'd really like to read using the Fabrik API so that if I attempt to read a record excluded by prefilter, I'd be able to tell.
I've looked through the /models/list.php and I see getData but it is unclear to me if there is a way to issue a query against this list using the Fabrik API. Any advice would be greatly appreciated.