[dev] Turba API search()
Sebastian Birnbach
birnbacs at gmail.com
Mon Jun 6 14:52:08 UTC 2016
I am working on a Block that will output certain address book information.
I have trouble restricting the search to certain fields, namely the
"company" field.
[...]
$terms = array($this->_params['search']);
$options = array(
'count_only' => false,
'fields' => array('company')
);
$res = $registry->contacts->search($terms, $options);
[...]
This returns all persons with the search string in any searchable field, be
it "company" or "name".
I enclose the Block lib/Block/Contacts.php for better reproducability, call
it from any wiki page with this code:
[[block horde/Contacts search=string]]
Any clues anybody?
Kind regards
Sebastian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Contacts.php
Type: application/x-httpd-php
Size: 2333 bytes
Desc: not available
URL: <https://lists.horde.org/archives/dev/attachments/20160606/35366068/attachment.bin>
More information about the dev
mailing list