Merge pull request #5227 from totten/master-abtest-returnurl
[civicrm-core.git] / api / v3 / Entity.php
CommitLineData
6a488035 1<?php
6a488035 2
a14e9d08 3/**
61fe4988
EM
4 * Get list of deprecated entities.
5 *
244bbdd8
CW
6 * This is called by the api wrapper when returning the result of api.Entity.get.
7 *
decce855 8 * @param array $entities
61fe4988 9 *
a6c01b45 10 * @return array
16b10e64 11 * Array of deprecated api entities
a14e9d08
CW
12 */
13function _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
6a488035 25/**
9d32e6f7
EM
26 * Placeholder function.
27 *
28 * This should never be called, as it doesn't have any meaning.
29 *
d0997921 30 * @param array $params
9d32e6f7 31 *
645ee340 32 * @return array
6a488035
TO
33 */
34function civicrm_api3_entity_create($params) {
106a7a3a 35 return civicrm_api3_create_error("API (Entity, Create) does not exist Creating a new entity means modifying the source code of civiCRM.");
6a488035
TO
36}
37
38/**
9d32e6f7
EM
39 * Placeholder function.
40 *
41 * This should never be called, as it doesn't have any meaning.
42 *
d0997921 43 * @param array $params
9d32e6f7 44 *
645ee340 45 * @return array
6a488035
TO
46 */
47function civicrm_api3_entity_delete($params) {
106a7a3a 48 return civicrm_api3_create_error("API (Entity, Delete) does not exist Deleting an entity means modifying the source code of civiCRM.");
6a488035
TO
49}
50
51/**
9d32e6f7
EM
52 * Placeholder function.
53 *
54 * This should never be called, as it doesn't have any meaning.
55 *
d0997921 56 * @param array $params
9d32e6f7 57 *
645ee340 58 * @return array
6a488035
TO
59 */
60function civicrm_api3_entity_getfields($params) {
61 // we return an empty array so it makes it easier to write generic getdefaults / required tests
62 // without putting an exception in for entity
63 return civicrm_api3_create_success(array());
64}