Commit 77a1df30 authored by jmuzz's avatar jmuzz
Browse files

Issue #2186689: Fixed deletion via entity_delete().

parent e47409be
......@@ -56,6 +56,7 @@ function field_collection_entity_info() {
),
),
'access callback' => 'field_collection_item_access',
'deletion callback' => 'field_collection_item_delete',
'metadata controller class' => 'FieldCollectionItemMetadataController'
);
......@@ -796,6 +797,14 @@ function field_collection_item_access($op, FieldCollectionItemEntity $item = NUL
return $entity_access && field_access($op, $field, $item->hostEntityType(), $item->hostEntity(), $account);
}
/**
* Deletion callback
*/
function field_collection_item_delete($id) {
$fci = field_collection_item_load($id);
$fci->delete();
}
/**
* Implements hook_theme().
*/
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment