Merge branch 4.5 into master
[civicrm-core.git] / api / v3 / Entity.php
1 <?php
2
3 /**
4 * @deprecated api notice
5 * @param array entities
6 * @return array
7 * 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 */
24 function civicrm_api3_entity_create($params) {
25 return civicrm_api3_create_error("API (Entity, Create) does not exist Creating a new entity means modifying the source code of civiCRM.");
26 }
27
28 /**
29 * Placeholder function. This should never be called, as it doesn't have any meaning
30 */
31 function civicrm_api3_entity_delete($params) {
32 return civicrm_api3_create_error("API (Entity, Delete) does not exist Deleting an entity means modifying the source code of civiCRM.");
33 }
34
35 /**
36 * Placeholder function. This should never be called, as it doesn't have any meaning
37 */
38 function civicrm_api3_entity_getfields($params) {
39 // we return an empty array so it makes it easier to write generic getdefaults / required tests
40 // without putting an exception in for entity
41 return civicrm_api3_create_success(array());
42 }