APIv4 - Use event instead of hardcoded list to resolve entityName to className
authorColeman Watts <coleman@civicrm.org>
Fri, 8 Oct 2021 19:23:59 +0000 (15:23 -0400)
committerColeman Watts <coleman@civicrm.org>
Fri, 8 Oct 2021 19:23:59 +0000 (15:23 -0400)
commit8badd1d83698ed502d86a50202619b04ed3f5c8f
treeca1ae367113da93c9607878daeec933aa417e502
parent617345f83bce9370922ea3cdc7c16034b62949fa
APIv4 - Use event instead of hardcoded list to resolve entityName to className

Typically an APIv4 entity name and class name are the same,
e.g. the "Contact" entity has the class `Civi\Api4\Contact`.
However, there are a few oddballs (CiviCase, CustomValue) and other extensions
may introduce their own oddball entities; this event allows them to do so.
Civi/API/Request.php
Civi/Api4/Event/CreateApi4RequestEvent.php [new file with mode: 0644]
Civi/Api4/Event/Subscriber/CreateApi4RequestSubscriber.php [new file with mode: 0644]
Civi/Api4/Utils/CoreUtil.php