Commit 0a7180c4 authored by dpi's avatar dpi Committed by Oleh Vehera
Browse files

Issue #3257963 by dpi: Queue UI should inject services with interfaces instead...

Issue #3257963 by dpi: Queue UI should inject services with interfaces instead of concrete implementations
parent 78428a55
Loading
Loading
Loading
Loading
+9 −6
Original line number Diff line number Diff line
@@ -4,10 +4,13 @@ namespace Drupal\queue_ui\Form;

use Drupal\Core\Database\Database;
use Drupal\Core\Extension\ModuleHandler;
use Drupal\Core\Extension\ModuleHandlerInterface;
use Drupal\Core\Messenger\Messenger;
use Drupal\Core\Messenger\MessengerInterface;
use Drupal\Core\Queue\QueueFactory;
use Drupal\Core\Queue\QueueInterface;
use Drupal\Core\Queue\QueueWorkerManager;
use Drupal\Core\Queue\QueueWorkerManagerInterface;
use Drupal\Core\Session\AccountInterface;
use Drupal\Core\State\StateInterface;
use Drupal\Core\TempStore\PrivateTempStoreFactory;
@@ -55,7 +58,7 @@ class OverviewForm extends FormBase {
  /**
   * The Drupal module handler.
   *
   * @var \Drupal\Core\Extension\ModuleHandler
   * @var \Drupal\Core\Extension\ModuleHandlerInterface
   */
  protected $moduleHandler;

@@ -67,7 +70,7 @@ class OverviewForm extends FormBase {
  protected $dbConnection;

  /**
   * @var \Drupal\Core\Queue\QueueWorkerManager
   * @var \Drupal\Core\Queue\QueueWorkerManagerInterface
   */
  private $queueWorkerManager;

@@ -83,12 +86,12 @@ class OverviewForm extends FormBase {
   * @param \Drupal\Core\TempStore\PrivateTempStoreFactory $temp_store_factory
   * @param \Drupal\Core\Session\AccountInterface $current_user
   * @param \Drupal\Core\State\StateInterface $state
   * @param \Drupal\Core\Extension\ModuleHandler $module_handler
   * @param \Drupal\Core\Queue\QueueWorkerManager $queueWorkerManager
   * @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler
   * @param \Drupal\Core\Queue\QueueWorkerManagerInterface $queueWorkerManager
   * @param \Drupal\queue_ui\QueueUIManager $queueUIManager
   * @param \Drupal\Core\Messenger\Messenger $messenger
   * @param \Drupal\Core\Messenger\MessengerInterface $messenger
   */
  public function __construct(QueueFactory $queue_factory, PrivateTempStoreFactory $temp_store_factory, AccountInterface $current_user, StateInterface $state, ModuleHandler $module_handler, QueueWorkerManager $queueWorkerManager, QueueUIManager $queueUIManager, Messenger $messenger) {
  public function __construct(QueueFactory $queue_factory, PrivateTempStoreFactory $temp_store_factory, AccountInterface $current_user, StateInterface $state, ModuleHandlerInterface $module_handler, QueueWorkerManagerInterface $queueWorkerManager, QueueUIManager $queueUIManager, MessengerInterface $messenger) {
    $this->queueFactory = $queue_factory;
    $this->tempStoreFactory = $temp_store_factory;
    $this->currentUser = $current_user;