Commit 0b7c4a27 authored by webchick's avatar webchick

Issue #2391381 by fago: $include_computed parameter from Map::getValue() is broken and unused

parent 2d727c6f
......@@ -161,8 +161,8 @@ public function setValue($values, $notify = TRUE) {
/**
* {@inheritdoc}
*/
public function getValue($include_computed = FALSE) {
$values = parent::getValue($include_computed);
public function getValue() {
$values = parent::getValue();
// If there is an unsaved entity, return it as part of the field item values
// to ensure idempotency of getValue() / setValue().
......
......@@ -63,13 +63,13 @@ protected function getPropertyDefinitions() {
}
/**
* Overrides \Drupal\Core\TypedData\TypedData::getValue().
* {@inheritdoc}
*/
public function getValue($include_computed = FALSE) {
public function getValue() {
// Update the values and return them.
foreach ($this->properties as $name => $property) {
$definition = $property->getDataDefinition();
if ($include_computed || !$definition->isComputed()) {
if (!$definition->isComputed()) {
$value = $property->getValue();
// Only write NULL values if the whole map is not NULL.
if (isset($this->values) || isset($value)) {
......
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