Commit b5e3cf78 authored by RaF's avatar RaF Committed by Joel Muzzerall
Browse files

Issue #2153083 by RaF7: Allow hook_entity_view_mode_alter() to be used on field collection items

parent 75067000
......@@ -506,6 +506,15 @@ class FieldCollectionItemEntity extends Entity {
return $export;
}
/**
* Generate an array for rendering the field collection item.
*/
public function view($view_mode = 'full', $langcode = NULL, $page = NULL) {
// Allow modules to change the view mode.
$view_mode = key(entity_view_mode_prepare($this->entityType, array($this->item_id => $this), $view_mode, $langcode));
return parent::view($view_mode, $langcode, $page);
}
/**
* Magic method to only serialize what's necessary.
*/
......
Supports Markdown
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