CRM-21707 use serialisation metadata from api basic_create_fallback.
authoreileen <emcnaughton@wikimedia.org>
Thu, 25 Jan 2018 03:09:23 +0000 (16:09 +1300)
committereileen <emcnaughton@wikimedia.org>
Thu, 25 Jan 2018 22:50:54 +0000 (11:50 +1300)
commit30208fab037dfe47c014dec4cec4429b0aeaf1d8
treed8972696477cbd29eddd029dae4d994f837b18c5
parent802eb612016039f9202d9062ee4c385511f5d820
CRM-21707 use serialisation metadata from api basic_create_fallback.

In order to add a unit test I enabled the same in-DAO handling on the Group BAO create
(since core api don't use the fallback). It allowed me to remove cruft and
to remove comments about removing cruft.

With this in place a custom entity (in an extension) could define

    <pseudoconstant>
      <optionGroupName>group_type</optionGroupName>
    </pseudoconstant>
    <serialize>SEPARATOR_BOOKEND</serialize>

and that field would accept an array of valid names that map to group_types
and the api would handle the serialisation. api v4 supports this so good prep
CRM/Contact/BAO/Group.php
CRM/Contact/DAO/Group.php
CRM/Core/DAO.php
CRM/Core/Error.php
api/v3/utils.php
tests/phpunit/api/v3/GroupTest.php
xml/schema/Contact/Group.xml