Create blocks for multi-record custom fields
So far we've done blocks for emails, addresses, phones, etc. Basically every repeatable thing which extends contacts.
We've implemented this by adding afforms on disk, e.g. ang/BlockEmailDefault.aff.html
.
Multi-record custom fields work the same way, in that they extend Contacts and are repeatable. Api4 creates a "virtual" api entity for each one. E.g. when you create a custom set called "MyFields" an api entity is generated called "Custom_MyFields". Unlike normal apis, there is no file on disk for these virtual apis, but in every other way they are identical.
I'd like to do something similar for afforms, so that a custom set called "MyFields" will generate an afform block called "BlockCustomMyFields". So we need a place in CRM_Afform_AfformScanner
to hook in and generate "virtual" afforms that are not on disk (unless they get overridden) but still get retrieved every time the scanner looks for afforms.