Skip to content

Commit

Permalink
Removed unncessary class injections
Browse files Browse the repository at this point in the history
  • Loading branch information
peterjaap committed Jun 24, 2021
1 parent 0f08c7e commit f4079c9
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 12 deletions.
10 changes: 0 additions & 10 deletions src/Command/TemplateImport.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
namespace ElgentosDutchEmailTemplates\Command;

use Shopware\Core\Content\MailTemplate\Aggregate\MailTemplateType\MailTemplateTypeEntity;
use Shopware\Core\Content\MailTemplate\MailTemplateDefinition;
use Shopware\Core\Content\MailTemplate\MailTemplateEntity;
use Shopware\Core\Framework\Context;
use Shopware\Core\Framework\DataAbstractionLayer\EntityRepositoryInterface;
Expand All @@ -15,16 +14,13 @@
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;

/**
* Class ImageImport
* @package ElgentosDutchEmailTemplates\Command
*/
class TemplateImport extends Command
{
public ContainerInterface $container;

public EntityRepositoryInterface $languageRepository;

public EntityRepositoryInterface $mailTemplateRepository;
Expand All @@ -33,27 +29,21 @@ class TemplateImport extends Command

public EntityRepositoryInterface $mailTemplateTypeRepository;

public MailTemplateDefinition $mailTemplateDefinition;

public string $basePath = '';

public function __construct(
ContainerInterface $container,
EntityRepositoryInterface $languageRepository,
EntityRepositoryInterface $mailTemplateRepository,
EntityRepositoryInterface $mailTemplateTranslationRepository,
EntityRepositoryInterface $mailTemplateTypeRepository,
MailTemplateDefinition $mailTemplateDefinition,
string $name = null
)
{
parent::__construct($name);
$this->container = $container;
$this->languageRepository = $languageRepository;
$this->mailTemplateRepository = $mailTemplateRepository;
$this->mailTemplateTranslationRepository = $mailTemplateTranslationRepository;
$this->mailTemplateTypeRepository = $mailTemplateTypeRepository;
$this->mailTemplateDefinition = $mailTemplateDefinition;
}

protected function configure(): void
Expand Down
2 changes: 0 additions & 2 deletions src/Resources/config/services.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,10 @@
<services>
<service id="ElgentosDutchEmailTemplates\Command\TemplateImport" autowire="true">
<tag name="console.command" command="elgentos-dutch-email-templates:import" />
<argument type="service" id="Psr\Container\ContainerInterface" />
<argument type="service" id="language.repository"/>
<argument type="service" id="mail_template.repository" />
<argument type="service" id="mail_template_translation.repository" />
<argument type="service" id="mail_template_type.repository" />
<argument type="service" id="Shopware\Core\Content\MailTemplate\MailTemplateDefinition" />
</service>
</services>
</container>

0 comments on commit f4079c9

Please sign in to comment.