Merge pull request #4875 from civicrm/minor-fix
[civicrm-core.git] / api / v3 / Entity.php
CommitLineData
6a488035 1<?php
6a488035 2
a14e9d08
CW
3/**
4 * @deprecated api notice
5 * @param array entities
a6c01b45 6 * @return array
72b3a70c 7 * 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
23 */
24function civicrm_api3_entity_create($params) {
106a7a3a 25 return civicrm_api3_create_error("API (Entity, Create) does not exist Creating a new entity means modifying the source code of civiCRM.");
6a488035
TO
26}
27
28/**
29 * Placeholder function. This should never be called, as it doesn't have any meaning
30 */
31function civicrm_api3_entity_delete($params) {
106a7a3a 32 return civicrm_api3_create_error("API (Entity, Delete) does not exist Deleting an entity means modifying the source code of civiCRM.");
6a488035
TO
33}
34
35/**
36 * Placeholder function. This should never be called, as it doesn't have any meaning
37 */
38function 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}