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; protected $translator;
public function __construct(TranslatorInterface $translatorInterface, ExportManager $exportManager)
public function __construct(TranslatorInterface $translator, ExportManager $manager)
{ {
$this->translator = $translator; $this->translator = $translatorInterface;
$this->exportManager = $manager; $this->exportManager = $exportManager;
} }
public function getType() public function getType()
{ {
return FormatterInterface::TYPE_LIST; 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->translator = $translatorInterface;
$this->exportManager = $manager; $this->exportManager = $exportManager;
} }
public function getType() 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->translator = $translatorInterface;
$this->exportManager = $manager; $this->exportManager = $exportManager;
} }
public function getType() public function getType()

View File

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