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