protected function HostingFieldCleanup::deleteFieldInstances in Aegir Objects 7.3
Delete all fields instances defined in this module from their bundles.
1 call to HostingFieldCleanup::deleteFieldInstances()
- HostingFieldCleanup::disableModule in classes/
HostingFieldCleanup.inc - Call this method when disabling a module.
File
- classes/
HostingFieldCleanup.inc, line 32 - The HostingFieldCleanup class.
Class
- HostingFieldCleanup
- @file The HostingFieldCleanup class.
Code
protected function deleteFieldInstances() {
if (module_load_include('inc', $this->module, $this->module . '.features.field_instance')) {
$function = $this->module . '_field_default_field_instances';
if (function_exists($function)) {
foreach ($function() as $instance) {
field_delete_instance($instance, FALSE);
}
}
}
}