Use apiv4, cache infra for basicTypes
authoreileen <emcnaughton@wikimedia.org>
Mon, 25 May 2020 06:51:33 +0000 (18:51 +1200)
committereileen <emcnaughton@wikimedia.org>
Mon, 25 May 2020 21:08:14 +0000 (09:08 +1200)
commita18a4870c42b071eeb11f408b7a3b8258888fba3
tree5a1cff60a7401f04ccf35ca1ddf56b181c64fe16
parent8e268efcf1363eb8b64ce7bd3b72c627c61d8d96
Use apiv4, cache infra for basicTypes

I came across this as using an old weird pattern accessing the DAO. On looking it made most
sense just to switch to an apiv4 call. The caching was not convoluted but effectively
used an array cache, if loaded, and the array or Redis or sql cache if not. This
is the same as using the 'metadata' or 'contactTypes' cache so I switched to the latter.

I was inclined towards the former as I lean towards thinking this metadata all belongs in one - but there
is already another function in the same class going to the latter.
CRM/Contact/BAO/ContactType.php
CRM/Core/SelectValues.php