Merge pull request #21937 from eileenmcnaughton/upit
[civicrm-core.git] / Civi / Api4 / Entity.php
index e66a9bec701b3f9cb70bd6db438642115d492ca7..d6b0dfcc3c064b667bc252f9fd297d41a30a226b 100644 (file)
@@ -1,5 +1,4 @@
 <?php
-
 /*
  +--------------------------------------------------------------------+
  | Copyright CiviCRM LLC. All rights reserved.                        |
@@ -9,14 +8,6 @@
  | and copyright information, see https://civicrm.org/licensing       |
  +--------------------------------------------------------------------+
  */
-
-/**
- *
- * @package CRM
- * @copyright CiviCRM LLC https://civicrm.org/licensing
- */
-
-
 namespace Civi\Api4;
 
 /**
@@ -25,6 +16,7 @@ namespace Civi\Api4;
  * @see \Civi\Api4\Generic\AbstractEntity
  *
  * @searchable none
+ * @since 5.19
  * @package Civi\Api4
  */
 class Entity extends Generic\AbstractEntity {
@@ -66,6 +58,7 @@ class Entity extends Generic\AbstractEntity {
             'DAOEntity' => 'DAOEntity',
             'CustomValue' => 'CustomValue',
             'BasicEntity' => 'BasicEntity',
+            'ManagedEntity' => 'ManagedEntity',
             'EntityBridge' => 'EntityBridge',
             'OptionList' => 'OptionList',
           ],
@@ -87,8 +80,9 @@ class Entity extends Generic\AbstractEntity {
           'description' => 'Class name for dao-based entities',
         ],
         [
-          'name' => 'id_field',
-          'description' => 'Name of unique identifier field (e.g. "id")',
+          'name' => 'primary_key',
+          'type' => 'Array',
+          'description' => 'Name of unique identifier field(s) (e.g. [id])',
         ],
         [
           'name' => 'label_field',
@@ -114,6 +108,16 @@ class Entity extends Generic\AbstractEntity {
           'data_type' => 'Array',
           'description' => 'Any @see annotations from docblock',
         ],
+        [
+          'name' => 'since',
+          'data_type' => 'String',
+          'description' => 'Version this API entity was added',
+        ],
+        [
+          'name' => 'class',
+          'data_type' => 'String',
+          'description' => 'PHP class name',
+        ],
         [
           'name' => 'bridge',
           'data_type' => 'Array',
@@ -130,6 +134,7 @@ class Entity extends Generic\AbstractEntity {
 
   /**
    * @param bool $checkPermissions
+   * @deprecated
    * @return Action\Entity\GetLinks
    */
   public static function getLinks($checkPermissions = TRUE) {