APIv4 - Return id_field as part of Entity.get
authorColeman Watts <coleman@civicrm.org>
Tue, 1 Jun 2021 02:35:32 +0000 (22:35 -0400)
committerColeman Watts <coleman@civicrm.org>
Tue, 1 Jun 2021 02:35:32 +0000 (22:35 -0400)
commit482a26e29686f1c889609061d94d83fef736aeec
tree2df4846057d66c7bd69ccd390aa9ba606db5920d
parent0a5e0d244910faef4fcf3b269257bcd7c3ff132d
APIv4 - Return id_field as part of Entity.get

All entities have a unique identifier field, usually named 'id'
but some entities the field is named something else.
e.g. Afform uses 'name' as the identifier.

This returns the name of the field as part of Entity.get,
and it's also available directly from each API class e.g. Contact::getInfo().
Civi/Api4/Entity.php
Civi/Api4/Generic/AbstractEntity.php
Civi/Api4/Generic/BasicEntity.php
ext/afform/core/Civi/Api4/Afform.php
tests/phpunit/api/v4/Action/BasicActionsTest.php
tests/phpunit/api/v4/Mock/Api4/MockBasicEntity.php
tests/phpunit/api/v4/Mock/MockEntityDataStorage.php