Custom converters can be injected with the EVENT_RESOLVE_CONVERTER event.
This can be especially useful for importing and exporting custom field types.
The converters need to implement the NerdsAndCompany\Schematic\Interfaces\ConverterInterface.
Event::on(Schematic::class, Schematic::EVENT_RESOLVE_CONVERTER, function (ConverterEvent $event) {
if ($event->modelClass = "My\Custom\Field") {
$event->converterClass = "My\Custom\FieldConverter";
}
});
Custom converters can be injected with the
EVENT_RESOLVE_CONVERTER
event. This can be especially useful for importing and exporting custom field types. The converters need to implement theNerdsAndCompany\Schematic\Interfaces\ConverterInterface
.Fixes #123