[REF] Consolidate retrieval of searchFormValues
authoreileen <emcnaughton@wikimedia.org>
Fri, 25 Sep 2020 02:46:31 +0000 (14:46 +1200)
committereileen <emcnaughton@wikimedia.org>
Fri, 25 Sep 2020 20:16:48 +0000 (08:16 +1200)
commit2d09a0c34e59d879a30239064365ce957b166420
tree6328bc56ec3c379ddc1f60a2b51548b0f4dad9cc
parent97ff3c552fa4d6125ccbfdfd05dfae0d2e498d3d
[REF] Consolidate retrieval of searchFormValues

Currently there are 3 ways in which the values from the searchForm are retrieved

1) the search form sets a value 'searchFormName' on the form during search which can
be later retrieved
2) the search task has an action that reflects the form it came from
3) as per 2 but there is additional handling for the fact it might be
the contact search (knowable because the entity has been set to 'Contact'

I'm not 100% sure at this stage that the selected method (3) in this PR is the best -
but it seems 'as good' as 1 with less form-state stuff and this PR consolidates it
into 1 place so it is handled consistently
18 files changed:
CRM/Activity/Form/Task.php
CRM/Case/Form/Search.php
CRM/Contact/Form/Search/Advanced.php
CRM/Contact/Form/Search/Basic.php
CRM/Contact/Form/Search/Builder.php
CRM/Contact/Form/Search/Custom.php
CRM/Contact/Form/Task.php
CRM/Contribute/Form/Search.php
CRM/Contribute/Form/Task.php
CRM/Core/Form/Task.php
CRM/Event/Form/Search.php
CRM/Event/Form/Task.php
CRM/Export/Form/Select.php
CRM/Grant/Form/Task.php
CRM/Mailing/Form/Task.php
CRM/Member/Form/Search.php
CRM/Member/Form/Task.php
tests/phpunit/CRM/Contribute/Form/TaskTest.php