Open godismyjudge95 opened 4 weeks ago
I looked through the docs but did not find anything. It would be great if you could register/enable/disable bard sets via PHP.
Something like:
Bard::registerSet(name: 'testimonials-v2', group: 'blocks', set: [ 'display' => 'Testimonials', 'icon' => 'text-formatting-quotation', 'fields' => ['import' => 'block_testimonials'], ]);
And if you needed to register it based on a specific condition:
Bard::boot(function ($field, $context) { if ($context['collection'] === 'posts') { return; } register_custom_sets(); });
Finally to disable a set:
Bard::deregisterSet('testimonials-v1');
I looked through the docs but did not find anything. It would be great if you could register/enable/disable bard sets via PHP.
Something like:
And if you needed to register it based on a specific condition:
Finally to disable a set: