Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
0d9e300f
Commit
0d9e300f
authored
Sep 28, 2014
by
Angie Byron
Browse files
Issue
#2346433
by yched: Fixed iterators omit computed fields by default.
parent
e18b6161
Changes
3
Hide whitespace changes
Inline
Side-by-side
core/lib/Drupal/Core/Entity/ContentEntityBase.php
View file @
0d9e300f
...
...
@@ -383,7 +383,7 @@ public function set($name, $value, $notify = TRUE) {
/**
* {@inheritdoc}
*/
public
function
getFields
(
$include_computed
=
FALS
E
)
{
public
function
getFields
(
$include_computed
=
TRU
E
)
{
$fields
=
array
();
foreach
(
$this
->
getFieldDefinitions
()
as
$name
=>
$definition
)
{
if
(
$include_computed
||
!
$definition
->
isComputed
())
{
...
...
core/lib/Drupal/Core/Entity/ContentEntityInterface.php
View file @
0d9e300f
...
...
@@ -196,7 +196,7 @@ public function set($field_name, $value, $notify = TRUE);
* @return \Drupal\Core\Field\FieldItemListInterface[]
* An array of field item lists implementing, keyed by field name.
*/
public
function
getFields
(
$include_computed
=
FALS
E
);
public
function
getFields
(
$include_computed
=
TRU
E
);
/**
* Reacts to changes to a field.
...
...
core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php
View file @
0d9e300f
...
...
@@ -180,7 +180,7 @@ protected function invokeTranslationHooks(ContentEntityInterface $entity) {
protected
function
invokeFieldMethod
(
$method
,
ContentEntityInterface
$entity
)
{
foreach
(
array_keys
(
$entity
->
getTranslationLanguages
())
as
$langcode
)
{
$translation
=
$entity
->
getTranslation
(
$langcode
);
foreach
(
$translation
->
getFields
(
TRUE
)
as
$field
)
{
foreach
(
$translation
->
getFields
()
as
$field
)
{
$field
->
$method
();
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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