function field_test_field_storage_delete_instance
Implements hook_field_storage_delete_instance().
File
-
modules/
field/ tests/ field_test.storage.inc, line 299
Code
function field_test_field_storage_delete_instance($instance) {
$data = _field_test_storage_data();
$field = field_info_field($instance['field_name']);
$field_data =& $data[$field['id']];
foreach (array(
'current',
'revisions',
) as $sub_table) {
foreach ($field_data[$sub_table] as &$row) {
if ($row->bundle == $instance['bundle']) {
$row->deleted = TRUE;
}
}
}
_field_test_storage_data($data);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.