Skip to content

Commit 1964c27

Browse files
committed
Updated Digital post command
1 parent 1e60744 commit 1964c27

File tree

2 files changed

+15
-12
lines changed

2 files changed

+15
-12
lines changed

modules/os2forms_digital_post/drush.services.yml

Lines changed: 0 additions & 10 deletions
This file was deleted.

modules/os2forms_digital_post/src/Commands/DigitalPostTestCommands.php renamed to modules/os2forms_digital_post/src/Drush/Commands/DigitalPostTestCommands.php

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace Drupal\os2forms_digital_post\Commands;
3+
namespace Drupal\os2forms_digital_post\Drush\Commands;
44

55
use Drupal\Component\Serialization\Yaml;
66
use Drupal\Core\Utility\Token;
@@ -12,12 +12,13 @@
1212
use ItkDev\Serviceplatformen\Service\SF1601\SF1601;
1313
use Symfony\Component\Console\Exception\InvalidArgumentException;
1414
use Symfony\Component\Console\Style\SymfonyStyle;
15+
use Symfony\Component\DependencyInjection\ContainerInterface;
1516
use Symfony\Contracts\HttpClient\Exception\ClientExceptionInterface;
1617

1718
/**
1819
* Test commands for digital post.
1920
*/
20-
class DigitalPostTestCommands extends DrushCommands {
21+
final class DigitalPostTestCommands extends DrushCommands {
2122

2223
/**
2324
* Constructor.
@@ -30,6 +31,18 @@ public function __construct(
3031
) {
3132
}
3233

34+
/**
35+
* {@inheritdoc}
36+
*/
37+
public static function create(ContainerInterface $container) {
38+
return new static(
39+
$container->get(DigitalPostHelper::class),
40+
$container->get('token'),
41+
$container->get('plugin.manager.entity_print.print_engine'),
42+
$container->get(Settings::class),
43+
);
44+
}
45+
3346
/**
3447
* Send digital post.
3548
*

0 commit comments

Comments
 (0)