- Issue created by @Akhil Babu
- 🇩🇪Germany marcus_johansson
Thanks, I wonder if it makes sense to remove the default, but I'll just merge this for now.
Automatically closed - issue fixed for 2 weeks with no activity.
- Issue was unassigned.
- Status changed to Fixed
about 2 months ago 8:45pm 29 July 2025 - 🇮🇹Italy salvatore_severo Foggia
The problem persists on 1.2.x-dev
'fields' => new ContextDefinition( data_type: 'list', label: new TranslatableMarkup("Fields"), description: new TranslatableMarkup("The fields to list. Leave empty to list all fields."), required: FALSE, default_value: ['id'], ),
We should remove default_value: ['id'] and then modify
$entity_data = []; foreach ($fields as $field) { $entity_data[] = $entity->get($field); } $this->list[] = $entity_data;
to
$entity_data = []; if (!is_null($fields) && count($fields)) { foreach ($fields as $field) { $entity_data[$field] = $entity->get($field); } } else { // Else the whole entity. $entity_data[] = $entity->toArray(); } $this->list[] = $entity_data;