APIv4 - Fix label_field to use underscore instead of camelCase
authorColeman Watts <coleman@civicrm.org>
Fri, 5 Feb 2021 20:36:26 +0000 (15:36 -0500)
committerColeman Watts <coleman@civicrm.org>
Fri, 5 Feb 2021 20:36:26 +0000 (15:36 -0500)
Civi/Api4/Entity.php
Civi/Api4/Generic/AbstractEntity.php

index 5689252494163f5fd209bf21185b964aa4bed3bd..31b3aeed6c4af582916c2748704ece71a9ef8bf2 100644 (file)
@@ -85,7 +85,7 @@ class Entity extends Generic\AbstractEntity {
           'description' => 'Class name for dao-based entities',
         ],
         [
-          'name' => 'labelField',
+          'name' => 'label_field',
           'description' => 'Field to show when displaying a record',
         ],
         [
index ae17fcdd3463f932c74d99fb83bf740ae7b1b8ac..a2d5e117cd9c3b52e0154a1a06a4f34f673ffdd5 100644 (file)
@@ -143,7 +143,7 @@ abstract class AbstractEntity {
     if ($dao) {
       $info['paths'] = $dao::getEntityPaths();
       $info['icon'] = $dao::$_icon;
-      $info['labelField'] = $dao::$_labelField;
+      $info['label_field'] = $dao::$_labelField;
       $info['dao'] = $dao;
     }
     foreach (ReflectionUtils::getTraits(static::class) as $trait) {