From b441e024ad283b2558c7e6a5b48703e7d0bb0b66 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Fri, 5 Feb 2021 15:36:26 -0500 Subject: [PATCH] APIv4 - Fix label_field to use underscore instead of camelCase --- Civi/Api4/Entity.php | 2 +- Civi/Api4/Generic/AbstractEntity.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Civi/Api4/Entity.php b/Civi/Api4/Entity.php index 5689252494..31b3aeed6c 100644 --- a/Civi/Api4/Entity.php +++ b/Civi/Api4/Entity.php @@ -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', ], [ diff --git a/Civi/Api4/Generic/AbstractEntity.php b/Civi/Api4/Generic/AbstractEntity.php index ae17fcdd34..a2d5e117cd 100644 --- a/Civi/Api4/Generic/AbstractEntity.php +++ b/Civi/Api4/Generic/AbstractEntity.php @@ -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) { -- 2.25.1