[$this, 'renderInterests'], ]; } public function renderInterests(?string $interests): string { if ($interests === null) { return ''; } $explodedInterests = explode(',', $interests); $rtVal = []; foreach ($explodedInterests as $interest) { $rtVal[] = $this->translator->translate('survey.interests.' . $interest); } return implode(',', $rtVal); } }