diff --git a/core/modules/views/src/Plugin/views/field/Field.php b/core/modules/views/src/Plugin/views/field/Field.php index 997ce54..5e98848 100644 --- a/core/modules/views/src/Plugin/views/field/Field.php +++ b/core/modules/views/src/Plugin/views/field/Field.php @@ -829,65 +829,6 @@ public function getItems(ResultRow $values) { return $items; } - /** - * Process an entity before using it for rendering. - * - * Replaces values with aggregated values if aggregation is enabled. - * Takes delta settings into account (@todo remove in #1758616). - * - * @param \Drupal\views\ResultRow $values - * The result row object containing the values. - * @param \Drupal\Core\Entity\EntityInterface $entity - * The entity to be processed. - * @param bool $clone - * (optional) Whether a clone of the specified entity should processed. - * Defaults to TRUE. - * - * @return bool|\Drupal\Core\Entity\FieldableEntityInterface - * Returns the processed entity if successful, else returns FALSE. - */ - public function processEntity(ResultRow $values, EntityInterface $entity, $clone = TRUE) { - $processed_entity = $clone ? clone $entity : $entity; - - // If we are grouping, copy our group fields into the cloned entity. - // It's possible this will cause some weirdness, but there's only - // so much we can hope to do. - if (!empty($this->group_fields)) { - // first, test to see if we have a base value. - $base_value = array(); - // Note: We would copy original values here, but it can cause problems. - // For example, text fields store cached filtered values as - // 'safe_value' which doesn't appear anywhere in the field definition - // so we can't affect it. Other side effects could happen similarly. - $data = FALSE; - foreach ($this->group_fields as $field_name => $column) { - if (property_exists($values, $this->aliases[$column])) { - $base_value[$field_name] = $values->{$this->aliases[$column]}; - if (isset($base_value[$field_name])) { - $data = TRUE; - } - } - } - - // If any of our aggregated fields have data, fake it: - if ($data) { - // Now, overwrite the original value with our aggregated value. - // This overwrites it so there is always just one entry. - $processed_entity->{$this->definition['field_name']} = array($base_value); - } - else { - $processed_entity->{$this->definition['field_name']} = array(); - } - } - - // The field we are trying to display doesn't exist on this entity. - if (!isset($processed_entity->{$this->definition['field_name']})) { - return FALSE; - } - - return $processed_entity; - } - function render_item($count, $item) { return render($item['rendered']); }