Afform - Read afform defn from .aff.php files as well as .aff.json
authorcolemanw <coleman@civicrm.org>
Thu, 21 Sep 2023 23:16:46 +0000 (19:16 -0400)
committercolemanw <coleman@civicrm.org>
Fri, 22 Sep 2023 13:27:25 +0000 (09:27 -0400)
commitd069195d0a4e21cc5eba1cb66d26c902b044975c
treef282fe92300d99cf8a71958b80c288e210480951
parentae985d57ad640ea8b42bf3654fb1dd32b916a6cd
Afform - Read afform defn from .aff.php files as well as .aff.json

By switching the file format, defn fields like `title` and `description` can be wrapped in ts().
This is intended for developers and extensions authors. They can generate these php files by calling `Afform.get`
with the api explorer, and copying the result (minus the "layout" field).
FormBuilder still saves files locally in `aff.json` format.
Overriding a packaged `.aff.php` form with a local `aff.json` works fine.
ext/afform/core/CRM/Afform/AfformScanner.php
ext/afform/core/CRM/Afform/Upgrader.php
ext/afform/core/Civi/Api4/Action/Afform/Revert.php
ext/afform/core/Civi/Api4/Utils/AfformSaveTrait.php