[REF] Move handling of form elements back to the Form
authoreileen <emcnaughton@wikimedia.org>
Tue, 28 Jul 2020 02:44:08 +0000 (14:44 +1200)
committereileen <emcnaughton@wikimedia.org>
Tue, 28 Jul 2020 03:40:27 +0000 (15:40 +1200)
commitc813e8f4b128cb2e03a7f81ceaa7ebb4c01bbc3e
treefa0613ebdd66b00c9a7cf1b84f92a9caeda0f60f
parent6010fe35306be8f1a3f6546cc2244636d6f7322d
[REF] Move handling of form elements back to the Form

This toxic function getRowsElementsAndInfo does things for the form layer but it's also heavily used
in the BAO dedupeProcess. Ideally we want the things that are onnly being done to support (one specific) form
to sit on that form. This does that just for one of the 2 arrays it creates of form elements.

The rel_table_elements array is just an array that looks like

[
  ['checkbox',  'move_rel_contributions'],
  ['checkbox, 'move_rel_activities'],
]

The rel_tables array is an array of metadata keyed by eg. move_rel_contributions.

Ergo this can be done easily on the form layer with the data it already has
CRM/Contact/Form/Merge.php
CRM/Dedupe/Merger.php