mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-13 05:44:24 +00:00
exports: fix errors and depreciations
This commit is contained in:
parent
e9fca1288a
commit
56bed12886
@ -425,7 +425,9 @@ class ListPerson implements ExportElementValidatedInterface, ListInterface
|
|||||||
if ('_header' === $value) {
|
if ('_header' === $value) {
|
||||||
return $this->translatableStringHelper->localize($cf->getName());
|
return $this->translatableStringHelper->localize($cf->getName());
|
||||||
}
|
}
|
||||||
|
if (null === $value) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
return $this->customFieldProvider
|
return $this->customFieldProvider
|
||||||
->getCustomFieldByType($cf->getType())
|
->getCustomFieldByType($cf->getType())
|
||||||
->render(json_decode($value, true), $cf, 'csv');
|
->render(json_decode($value, true), $cf, 'csv');
|
||||||
@ -434,6 +436,9 @@ class ListPerson implements ExportElementValidatedInterface, ListInterface
|
|||||||
if ($cfType instanceof CustomFieldChoice && $cfType->isMultiple($cf)) {
|
if ($cfType instanceof CustomFieldChoice && $cfType->isMultiple($cf)) {
|
||||||
return function ($value) use ($cf, $cfType, $key) {
|
return function ($value) use ($cf, $cfType, $key) {
|
||||||
$slugChoice = $this->extractInfosFromSlug($key)['additionnalInfos']['choiceSlug'];
|
$slugChoice = $this->extractInfosFromSlug($key)['additionnalInfos']['choiceSlug'];
|
||||||
|
if (null === $value) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
$decoded = json_decode($value, true);
|
$decoded = json_decode($value, true);
|
||||||
|
|
||||||
if ('_header' === $value) {
|
if ('_header' === $value) {
|
||||||
@ -459,7 +464,7 @@ class ListPerson implements ExportElementValidatedInterface, ListInterface
|
|||||||
*/
|
*/
|
||||||
private function slugToDQL(string $slug, string $type = 'default', array $additionalInfos = []): string
|
private function slugToDQL(string $slug, string $type = 'default', array $additionalInfos = []): string
|
||||||
{
|
{
|
||||||
$uid = 'slug_' . uniqid('', true);
|
$uid = 'slug_' . uniqid('', false);
|
||||||
|
|
||||||
$this->slugs[$uid] = [
|
$this->slugs[$uid] = [
|
||||||
'slug' => $slug,
|
'slug' => $slug,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user