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