The following snippet used inside devel/php to export field base and instance settings.
It exports the base field definition, adds a wrapper to make sure the field does not yet exist.
It also exports the field instance settings, even allowing to select extra bundles to add the field to.
1 | $entity_type = 'node'; |