clean up changes for batch 18
[civicrm-core.git] / api / v3 / Entity.php
CommitLineData
6a488035 1<?php
6a488035 2
a14e9d08
CW
3/**
4 * @deprecated api notice
decce855 5 * @param array $entities
a6c01b45 6 * @return array
16b10e64 7 * Array of deprecated api entities
a14e9d08
CW
8 */
9function _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
6a488035
TO
21/**
22 * Placeholder function. This should never be called, as it doesn't have any meaning
d0997921 23 * @param array $params
645ee340 24 * @return array
6a488035
TO
25 */
26function civicrm_api3_entity_create($params) {
106a7a3a 27 return civicrm_api3_create_error("API (Entity, Create) does not exist Creating a new entity means modifying the source code of civiCRM.");
6a488035
TO
28}
29
30/**
31 * Placeholder function. This should never be called, as it doesn't have any meaning
d0997921 32 * @param array $params
645ee340 33 * @return array
6a488035
TO
34 */
35function civicrm_api3_entity_delete($params) {
106a7a3a 36 return civicrm_api3_create_error("API (Entity, Delete) does not exist Deleting an entity means modifying the source code of civiCRM.");
6a488035
TO
37}
38
39/**
40 * Placeholder function. This should never be called, as it doesn't have any meaning
d0997921 41 * @param array $params
645ee340 42 * @return array
6a488035
TO
43 */
44function 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}