2 interface CRM_Core_FileSearchInterface
{
3 const DEFAULT_SEARCH_LIMIT
= 20;
4 const DEFAULT_SEARCH_OFFSET
= 0;
7 * @param array $query any of the following:
8 * - text: string, plain text to search for
9 * - parent_table: string - entity to which file is directly attached
10 * - parent_id: int - entity to which file is directly attached
11 * - xparent_table: string - business-entity to which file is attached (directly or indirectly)
12 * - xparent_id: int - business-entity to which file is attached (directly or indirectly)
15 * @return array each item has keys:
17 * - parent_table: string - entity to which file is directly attached
18 * - parent_id: int - entity to which file is directly attached
19 * - xparent_table: string - business-entity to which file is attached (directly or indirectly)
20 * - xparent_id: int - business-entity to which file is attached (directly or indirectly)
22 function search($query, $limit = self
::DEFAULT_SEARCH_LIMIT
, $offset = self
::DEFAULT_SEARCH_OFFSET
);