fix Export: arguments definition in services

This commit is contained in:
nobohan 2020-07-23 15:25:01 +02:00
parent ed22551313
commit f9723e587f
4 changed files with 19 additions and 15 deletions

View File

@ -64,13 +64,13 @@ class CSVListFormatter implements FormatterInterface
protected $translator;
public function __construct(TranslatorInterface $translator, ExportManager $manager)
public function __construct(TranslatorInterface $translatorInterface, ExportManager $exportManager)
{
$this->translator = $translator;
$this->exportManager = $manager;
$this->translator = $translatorInterface;
$this->exportManager = $exportManager;
}
public function getType()
{
return FormatterInterface::TYPE_LIST;

View File

@ -64,10 +64,10 @@ class CSVPivotedListFormatter implements FormatterInterface
public function __construct(TranslatorInterface $translator, ExportManager $manager)
public function __construct(TranslatorInterface $translatorInterface, ExportManager $exportManager)
{
$this->translator = $translator;
$this->exportManager = $manager;
$this->translator = $translatorInterface;
$this->exportManager = $exportManager;
}
public function getType()

View File

@ -68,10 +68,10 @@ class SpreadsheetListFormatter implements FormatterInterface
public function __construct(TranslatorInterface $translator, ExportManager $manager)
public function __construct(TranslatorInterface $translatorInterface, ExportManager $exportManager)
{
$this->translator = $translator;
$this->exportManager = $manager;
$this->translator = $translatorInterface;
$this->exportManager = $exportManager;
}
public function getType()

View File

@ -15,28 +15,32 @@ services:
chill.main.export.spreadsheet_formatter:
class: Chill\MainBundle\Export\Formatter\SpreadSheetFormatter
arguments:
- "@translator"
$translatorInterface: '@Symfony\Component\Translation\TranslatorInterface'
$exportManager: '@Chill\MainBundle\Export\ExportManager'
tags:
- { name: chill.export_formatter, alias: 'spreadsheet' }
chill.main.export.list_formatter:
class: Chill\MainBundle\Export\Formatter\CSVListFormatter
arguments:
- "@translator"
$translatorInterface: '@Symfony\Component\Translation\TranslatorInterface'
$exportManager: '@Chill\MainBundle\Export\ExportManager'
tags:
- { name: chill.export_formatter, alias: 'csvlist' }
chill.main.export.list_spreadsheet_formatter:
class: Chill\MainBundle\Export\Formatter\SpreadsheetListFormatter
arguments:
- "@translator"
$translatorInterface: '@Symfony\Component\Translation\TranslatorInterface'
$exportManager: '@Chill\MainBundle\Export\ExportManager'
tags:
- { name: chill.export_formatter, alias: 'spreadlist' }
chill.main.export.pivoted_list_formatter:
class: Chill\MainBundle\Export\Formatter\CSVPivotedListFormatter
arguments:
- "@translator"
$translatorInterface: '@Symfony\Component\Translation\TranslatorInterface'
$exportManager: '@Chill\MainBundle\Export\ExportManager'
tags:
- { name: chill.export_formatter, alias: 'csv_pivoted_list' }