Commit 0d9e300f authored by webchick's avatar webchick

Issue #2346433 by yched: Fixed iterators omit computed fields by default.

parent e18b6161
......@@ -383,7 +383,7 @@ public function set($name, $value, $notify = TRUE) {
/**
* {@inheritdoc}
*/
public function getFields($include_computed = FALSE) {
public function getFields($include_computed = TRUE) {
$fields = array();
foreach ($this->getFieldDefinitions() as $name => $definition) {
if ($include_computed || !$definition->isComputed()) {
......
......@@ -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 = FALSE);
public function getFields($include_computed = TRUE);
/**
* Reacts to changes to a field.
......
......@@ -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();
}
}
......
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