protected function createEntityForGroupBy(EntityInterface
$entity, ResultRow
$row) { // Retrieve the correct translation object.
$processed_entity =
clone $this->
getEntityFieldRenderer()->
getEntityTranslationByRelationship($entity,
$row);
// Copy our group fields into the cloned entity. It is possible this will
// cause some weirdness, but there is only so much we can hope to do.
if (!
empty($this->group_fields
) &&
isset($entity->
{$this->definition
['field_name'
]})) { // first, test to see if we have a base value.
$base_value =
[];
// Note: We would copy original values here, but it can cause problems.
// For example, text fields store cached filtered values as 'safe_value'
// which does not appear anywhere in the field definition so we cannot
// affect it. Other side effects could happen similarly.
$data = FALSE;