INFRA-132 - Batch 14 (g)
[civicrm-core.git] / api / v3 / Entity.php
index ef461a7d08bab4187d8975ecb37d52b7607ba752..52ce682a1aa02af3a7c7bce210b51b253816cd1b 100644 (file)
@@ -1,9 +1,27 @@
 <?php
 
-require_once 'api/v3/utils.php';
+/**
+ * @deprecated api notice
+ * @param array $entities
+ * @return array
+ *   Array of deprecated api entities
+ */
+function _civicrm_api3_entity_deprecation($entities) {
+  $deprecated = array();
+  if (!empty($entities['values'])) {
+    foreach ($entities['values'] as $entity) {
+      if (is_string(_civicrm_api3_deprecation_check($entity))) {
+        $deprecated[] = $entity;
+      }
+    }
+  }
+  return $deprecated;
+}
 
 /**
  *  Placeholder function. This should never be called, as it doesn't have any meaning
+ * @param array $params
+ * @return array
  */
 function civicrm_api3_entity_create($params) {
   return civicrm_api3_create_error("API (Entity, Create) does not exist Creating a new entity means modifying the source code of civiCRM.");
@@ -11,6 +29,8 @@ function civicrm_api3_entity_create($params) {
 
 /**
  *  Placeholder function. This should never be called, as it doesn't have any meaning
+ * @param array $params
+ * @return array
  */
 function civicrm_api3_entity_delete($params) {
   return civicrm_api3_create_error("API (Entity, Delete) does not exist Deleting an entity means modifying the source code of civiCRM.");
@@ -18,10 +38,11 @@ function civicrm_api3_entity_delete($params) {
 
 /**
  *  Placeholder function. This should never be called, as it doesn't have any meaning
+ * @param array $params
+ * @return array
  */
 function civicrm_api3_entity_getfields($params) {
   // we return an empty array so it makes it easier to write generic getdefaults / required tests
   // without putting an exception in for entity
   return civicrm_api3_create_success(array());
 }
-