Afform - Optimize Get by checking type before parsing html or loading custom data
authorColeman Watts <coleman@civicrm.org>
Mon, 30 Aug 2021 12:31:11 +0000 (08:31 -0400)
committerColeman Watts <coleman@civicrm.org>
Mon, 30 Aug 2021 12:33:42 +0000 (08:33 -0400)
commit2ca6eeda9c47b3f16f915106c4d8e8d13f57726d
tree4370e27cc58ab39deaf4d4a9ffead81d345bca63
parent27bf657b9bccfc85e95609568f0dd3080da1528f
Afform - Optimize Get by checking type before parsing html or loading custom data

Sometimes afforms are fetched by type, e.g. `cv api4 Afform.get +w type=search`
Previously this would load all html files and custom data groups before
discarding the ones not of type search.
Now it will skip irrelevant files.
ext/afform/core/Civi/Api4/Action/Afform/Get.php