Merge pull request #4923 from colemanw/invoice_id
[civicrm-core.git] / api / v3 / Entity.php
1 <?php
2
3 /**
4 * @deprecated api notice
5 * @param array $entities
6 * @return array
7 * Array of deprecated api entities
8 */
9 function _civicrm_api3_entity_deprecation($entities) {
10 $deprecated = array();
11 if (!empty($entities['values'])) {
12 foreach ($entities['values'] as $entity) {
13 if (is_string(_civicrm_api3_deprecation_check($entity))) {
14 $deprecated[] = $entity;
15 }
16 }
17 }
18 return $deprecated;
19 }
20
21 /**
22 * Placeholder function. This should never be called, as it doesn't have any meaning
23 * @param array $params
24 * @return array
25 */
26 function civicrm_api3_entity_create($params) {
27 return civicrm_api3_create_error("API (Entity, Create) does not exist Creating a new entity means modifying the source code of civiCRM.");
28 }
29
30 /**
31 * Placeholder function. This should never be called, as it doesn't have any meaning
32 * @param array $params
33 * @return array
34 */
35 function civicrm_api3_entity_delete($params) {
36 return civicrm_api3_create_error("API (Entity, Delete) does not exist Deleting an entity means modifying the source code of civiCRM.");
37 }
38
39 /**
40 * Placeholder function. This should never be called, as it doesn't have any meaning
41 * @param array $params
42 * @return array
43 */
44 function civicrm_api3_entity_getfields($params) {
45 // we return an empty array so it makes it easier to write generic getdefaults / required tests
46 // without putting an exception in for entity
47 return civicrm_api3_create_success(array());
48 }