Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
drupal.org
field_collection
Commits
77a1df30
Commit
77a1df30
authored
Sep 10, 2014
by
jmuzz
Browse files
Issue #2186689: Fixed deletion via entity_delete().
parent
e47409be
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
field_collection.module
field_collection.module
+9
-0
No files found.
field_collection.module
View file @
77a1df30
...
...
@@ -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().
*/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment