dev/core#2046 Migrate BAO_Address::create towards standardisation
authoreileen <emcnaughton@wikimedia.org>
Thu, 1 Oct 2020 22:57:07 +0000 (11:57 +1300)
committereileen <emcnaughton@wikimedia.org>
Fri, 2 Oct 2020 02:03:55 +0000 (15:03 +1300)
commitae7397a3c848bf089ad037b80267846aec2f39db
treefef2c3b9d83bd2e4e299e72f6e1bf237282c63ef
parent186f87a3c7567fb8018fb67009f815efe1047481
dev/core#2046 Migrate BAO_Address::create towards standardisation

Our standard expectation is that each BAO will have a create action that handles a single entity. For legacy
reasons Address.create has special handling for multiple addresses. This extracts that handling
into a separate function (legacyCreate) and updates the (very few) places currently calling create to
call that.

With this merged apis v3 & v4 can call Address.create  - currently v3 is hard coded to call add and
v4 bypasses the BAO altogher. The v4 api bypass means we are not managing is_primay integrity on v4 api calls
CRM/Contact/Form/Inline/Address.php
CRM/Core/BAO/Address.php
CRM/Core/BAO/Location.php
tests/phpunit/CRM/Core/BAO/AddressTest.php