I’m working on a CSV export plugin that provides export options in Omeka’s dashboard. It currently works for the following options:
- export all items in the repository
- export a subset of items, after limiting by collection, item type, tag, featured or not, or any combination of these in the advanced search.
But it is not exporting accurately after “narrowing by a specific field” in advanced search. In this case, the entire repository exports instead of the subset/search results.
In my controller, I’m building an array of filters and then passing them as $params:
$itemTable = $this->_helper->db->getTable(‘Item’);
$items = $itemTable->findBy($params);
The advanced search filter looks like this when added to findBy()
[“element_id”]=>string(3) “111”[“type”]=>string(8) “contains”[“terms”]=>string(12) “conservation”
I’m so close!! But for the moment, I’m stuck. Because the advanced search filter is an array instead of a key/value pair, I think my problem is related to the array structure. Any suggestions are much appreciated!!