| 1 | <?php |
| 2 | interface CRM_Core_FileSearchInterface { |
| 3 | const DEFAULT_SEARCH_LIMIT = 20; |
| 4 | const DEFAULT_SEARCH_OFFSET = 0; |
| 5 | |
| 6 | /** |
| 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) |
| 13 | * @param int $limit |
| 14 | * @param int $offset |
| 15 | * @return array each item has keys: |
| 16 | * - file_id: int |
| 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) |
| 21 | */ |
| 22 | function search($query, $limit = self::DEFAULT_SEARCH_LIMIT, $offset = self::DEFAULT_SEARCH_OFFSET); |
| 23 | } |