Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
drupal.org
field_collection
Commits
b5e3cf78
Commit
b5e3cf78
authored
Apr 28, 2016
by
RaF
Committed by
Joel Muzzerall
Apr 28, 2016
Browse files
Issue #2153083 by RaF7: Allow hook_entity_view_mode_alter() to be used on field collection items
parent
75067000
Changes
1
Hide whitespace changes
Inline
Side-by-side
field_collection.entity.inc
View file @
b5e3cf78
...
...
@@ -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.
*/
...
...
Write
Preview
Supports
Markdown
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