CRM-16701 - Some fixes in the unit tests.
[civicrm-core.git] / api / v3 / SavedSearch.php
CommitLineData
b4ee829e 1<?php
627adbf9 2
b4ee829e 3/*
627adbf9
JV
4 +--------------------------------------------------------------------+
5 | CiviCRM version 4.6 |
6 +--------------------------------------------------------------------+
7 | Copyright Chirojeugd-Vlaanderen vzw 2015 |
8 +--------------------------------------------------------------------+
9 | This file is a part of CiviCRM. |
10 | |
11 | CiviCRM is free software; you can copy, modify, and distribute it |
12 | under the terms of the GNU Affero General Public License |
13 | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
14 | |
15 | CiviCRM is distributed in the hope that it will be useful, but |
16 | WITHOUT ANY WARRANTY; without even the implied warranty of |
17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
18 | See the GNU Affero General Public License for more details. |
19 | |
20 | You should have received a copy of the GNU Affero General Public |
21 | License and the CiviCRM Licensing Exception along |
22 | with this program; if not, contact CiviCRM LLC |
23 | at info[AT]civicrm[DOT]org. If you have questions about the |
24 | GNU Affero General Public License or the licensing of CiviCRM, |
25 | see the CiviCRM license FAQ at http://civicrm.org/licensing |
26 +--------------------------------------------------------------------+
b4ee829e
JV
27 */
28
29/**
30 * This api exposes CiviCRM saved searches.
31 *
32 * @package CiviCRM_APIv3
33 */
34
35/**
627adbf9 36 * Create or update a saved search.
b4ee829e
JV
37 *
38 * @param array $params
627adbf9
JV
39 * Associative array of property name-value pairs to insert in new saved search.
40 * @example SavedSearch/Create.php Std create example.
41 * @return array api result array
42 * {@getfields saved_search_create}
43 * @access public
b4ee829e
JV
44 */
45function civicrm_api3_saved_search_create($params) {
46 return _civicrm_api3_basic_create(_civicrm_api3_get_BAO(__FUNCTION__), $params);
47}
48
49/**
627adbf9 50 * Delete an existing saved search.
b4ee829e
JV
51 *
52 * @param array $params
627adbf9
JV
53 * Associative array of property name-value pairs. $params['id'] should be
54 * the ID of the saved search to be deleted.
55 * @example SavedSearch/Delete.php Std delete example.
56 * @return array api result array
57 * {@getfields saved_search_delete}
58 * @access public
b4ee829e
JV
59 */
60function civicrm_api3_saved_search_delete($params) {
61 return _civicrm_api3_basic_delete(_civicrm_api3_get_BAO(__FUNCTION__), $params);
62}
63
64/**
65 * Retrieve one or more saved search(es).
66 *
67 * @param array $params
627adbf9
JV
68 * An associative array of name-value pairs.
69 * @example SavedSearch/Get.php Std get example.
70 * @return array api result array
71 * {@getfields saved_search_get}
72 * @access public
b4ee829e
JV
73 */
74function civicrm_api3_saved_search_get($params) {
75 return _civicrm_api3_basic_get(_civicrm_api3_get_BAO(__FUNCTION__), $params);
76}