];
$options['multi_type'] = [
- 'default' => 'separator'
+ 'default' => 'separator',
];
$options['separator'] = [
- 'default' => ', '
+ 'default' => ', ',
];
$options['field_api_classes'] = [
*/
public function getValue(ResultRow $values, $field = NULL) {
$entity = $this->getEntity($values);
+
+ // Ensure the object is not NULL before attempting to translate it.
+ if ($entity === NULL) {
+ return NULL;
+ }
+
// Retrieve the translated object.
$translated_entity = $this->getEntityFieldRenderer()->getEntityTranslation($entity, $values);