mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-02 21:13:57 +00:00
Feature: Add a list export for evaluation, actions and household
This commit is contained in:
@@ -28,6 +28,21 @@ class LabelThirdPartyHelper
|
||||
$this->thirdPartyRepository = $thirdPartyRepository;
|
||||
}
|
||||
|
||||
public function getLabel(string $key, array $values, string $header): callable
|
||||
{
|
||||
return function ($value) use ($header) {
|
||||
if ('_header' === $value) {
|
||||
return $header;
|
||||
}
|
||||
|
||||
if (null === $value || null === $thirdParty = $this->thirdPartyRepository->find($value)) {
|
||||
return '';
|
||||
}
|
||||
|
||||
return $this->thirdPartyRender->renderString($thirdParty, []);
|
||||
};
|
||||
}
|
||||
|
||||
public function getLabelMulti(string $key, array $values, string $header): callable
|
||||
{
|
||||
return function ($value) use ($header) {
|
||||
|
Reference in New Issue
Block a user