Skip to content
Snippets Groups Projects
Commit 697aeb8d authored by Maxime Roux's avatar Maxime Roux Committed by Artem Sylchuk
Browse files

Issue #3414396 by MacSim, dd_diablo, artem_sylchuk: Drush 12 compatibility

parent b8e66391
No related branches found
No related tags found
1 merge request!75Issue #3414396: Drush 12 compatibility
services:
private_message.commands:
class: \Drupal\private_message\Commands\PrivateMessageCommands
arguments:
- '@private_message.service'
- '@entity_type.manager'
tags:
- { name: drush.command }
......@@ -47,3 +47,11 @@ services:
private_message.private_message_config_form_manager:
class: '%private_message.private_message_config_form_manager.class%'
parent: default_plugin_manager
private_message.commands:
class: \Drupal\private_message\Drush\Commands\PrivateMessageCommands
arguments:
- '@private_message.service'
- '@entity_type.manager'
tags:
- { name: drush.command }
<?php
namespace Drupal\private_message\Commands;
namespace Drupal\private_message\Drush\Commands;
use Drupal\Component\DependencyInjection\ContainerInterface;
use Drupal\Core\Entity\EntityTypeManagerInterface;
use Drupal\Core\StringTranslation\StringTranslationTrait;
use Drupal\private_message\Service\PrivateMessageService;
......@@ -54,6 +55,16 @@ class PrivateMessageCommands extends DrushCommands {
$this->entityTypeManager = $entityTypeManager;
}
/**
* {@inheritdoc}
*/
public static function create(ContainerInterface $container): self {
return new static(
$container->get('private_message.service'),
$container->get('entity_type.manager')
);
}
/**
* Prepares the Private Message module for uninstallation.
*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment