[FR] Add an Event to register "Compatible Field Types" (to hide the yellow triangle) #13793
-
Beta Was this translation helpful? Give feedback.
Answered by
brandonkelly
Oct 11, 2023
Replies: 1 comment 5 replies
-
Added an event for the next release! (ca9b40a) use craft\base\Event;
use craft\events\DefineCompatibleFieldTypesEvent;
use craft\services\Fields;
Event::on(
Fields::class,
Fields::EVENT_DEFINE_COMPATIBLE_FIELD_TYPES,
function (DefineCompatibleFieldTypesEvent $event) {
if ($event->field instanceof GoogleMapsAddress) {
$event->compatibleTypes[] = MapboxAddress::class;
}
}
); |
Beta Was this translation helpful? Give feedback.
5 replies
Answer selected by
brandonkelly
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Added an event for the next release! (ca9b40a)