Merge pull request #10070 from eileenmcnaughton/dedup_3
[civicrm-core.git] / CRM / Core / FileSearchInterface.php
CommitLineData
6cccc6d4 1<?php
353ffa53 2
1cd3ffa9
EM
3/**
4 * Interface CRM_Core_FileSearchInterface
5 */
6cccc6d4
TO
6interface CRM_Core_FileSearchInterface {
7 const DEFAULT_SEARCH_LIMIT = 20;
8 const DEFAULT_SEARCH_OFFSET = 0;
9
10 /**
6a0b768e
TO
11 * @param array $query
12 * Any of the following:.
16b10e64
CW
13 * - text: string, plain text to search for
14 * - parent_table: string - entity to which file is directly attached
15 * - parent_id: int - entity to which file is directly attached
16 * - xparent_table: string - business-entity to which file is attached (directly or indirectly)
17 * - xparent_id: int - business-entity to which file is attached (directly or indirectly)
6cccc6d4
TO
18 * @param int $limit
19 * @param int $offset
a6c01b45
CW
20 * @return array
21 * each item has keys:
16b10e64
CW
22 * - file_id: int
23 * - parent_table: string - entity to which file is directly attached
24 * - parent_id: int - entity to which file is directly attached
25 * - xparent_table: string - business-entity to which file is attached (directly or indirectly)
26 * - xparent_id: int - business-entity to which file is attached (directly or indirectly)
6cccc6d4 27 */
00be9182 28 public function search($query, $limit = self::DEFAULT_SEARCH_LIMIT, $offset = self::DEFAULT_SEARCH_OFFSET);
96025800 29
ef10e0b5 30}