Loading src/Commands/QueueUiCommands.php +5 −2 Original line number Diff line number Diff line Loading @@ -3,6 +3,7 @@ namespace Drupal\queue_ui\Commands; use Drupal\Core\Batch\BatchBuilder; use Drupal\Core\StringTranslation\StringTranslationTrait; use Drupal\Core\Queue\QueueWorkerManagerInterface; use Drupal\queue_ui\QueueUIBatchInterface; use Drupal\queue_ui\QueueUIManager; Loading @@ -19,6 +20,8 @@ use Drush\Commands\DrushCommands; */ class QueueUiCommands extends DrushCommands { use StringTranslationTrait; /** * Queue worker manager. * Loading Loading @@ -162,7 +165,7 @@ class QueueUiCommands extends DrushCommands { // Remove leases. $num_updated = $queue_ui->releaseItems($queueName); $this->logger()->info(t('@count lease reset in queue @name', [ $this->logger()->info($this->t('@count lease reset in queue @name', [ '@count' => $num_updated, '@name' => $queueName, ])); Loading Loading @@ -193,7 +196,7 @@ class QueueUiCommands extends DrushCommands { // Show a list of all defined queues. $queueName = $this->io() ->choice(t('Which queue do you want to process?'), $queueNames); ->choice($this->t('Which queue do you want to process?'), $queueNames); } return $queueName; Loading src/Controller/QueueProcessController.php +4 −2 Original line number Diff line number Diff line Loading @@ -15,6 +15,8 @@ use Symfony\Component\HttpFoundation\RedirectResponse; class QueueProcessController implements ContainerInjectionInterface { /** * The QueueUIBatchInterface. * * @var \Drupal\queue_ui\QueueUIBatchInterface */ protected $batch; Loading @@ -30,7 +32,7 @@ class QueueProcessController implements ContainerInjectionInterface { } /** * Process a certain queue * Process a certain queue. */ public function process(string $queueName): ?RedirectResponse { $this->batch->batch([$queueName]); Loading @@ -39,7 +41,7 @@ class QueueProcessController implements ContainerInjectionInterface { } /** * Checks access for processing a certain queue * Checks access for processing a certain queue. */ public function access(AccountProxyInterface $account, string $queueName): AccessResultInterface { return AccessResult::allowedIfHasPermission($account, sprintf('process %s queue', $queueName)); Loading src/Form/ItemDetailForm.php +1 −1 Original line number Diff line number Diff line Loading @@ -51,7 +51,7 @@ class ItemDetailForm extends FormBase { return new static( $container->get('plugin.manager.queue_ui'), $container->get('renderer'), $container->get('module_handler'), $container->get('module_handler') ); } Loading src/Form/OverviewForm.php +2 −0 Original line number Diff line number Diff line Loading @@ -81,6 +81,8 @@ class OverviewForm extends FormBase { private $queueUIManager; /** * The QueueUIBatchInterface. * * @var \Drupal\queue_ui\QueueUIBatchInterface */ protected $queueUiBatch; Loading src/QueueUIBatch.php +1 −1 Original line number Diff line number Diff line Loading @@ -107,7 +107,7 @@ class QueueUIBatch implements QueueUIBatchInterface { $context['finished'] = 0; $context['results']['queueName'] = $info['title']; $title = t('Processing queue %name: %count items remaining', [ $title = $this->t('Processing queue %name: %count items remaining', [ '%name' => $info['title'], '%count' => $num_of_items, ]); Loading Loading
src/Commands/QueueUiCommands.php +5 −2 Original line number Diff line number Diff line Loading @@ -3,6 +3,7 @@ namespace Drupal\queue_ui\Commands; use Drupal\Core\Batch\BatchBuilder; use Drupal\Core\StringTranslation\StringTranslationTrait; use Drupal\Core\Queue\QueueWorkerManagerInterface; use Drupal\queue_ui\QueueUIBatchInterface; use Drupal\queue_ui\QueueUIManager; Loading @@ -19,6 +20,8 @@ use Drush\Commands\DrushCommands; */ class QueueUiCommands extends DrushCommands { use StringTranslationTrait; /** * Queue worker manager. * Loading Loading @@ -162,7 +165,7 @@ class QueueUiCommands extends DrushCommands { // Remove leases. $num_updated = $queue_ui->releaseItems($queueName); $this->logger()->info(t('@count lease reset in queue @name', [ $this->logger()->info($this->t('@count lease reset in queue @name', [ '@count' => $num_updated, '@name' => $queueName, ])); Loading Loading @@ -193,7 +196,7 @@ class QueueUiCommands extends DrushCommands { // Show a list of all defined queues. $queueName = $this->io() ->choice(t('Which queue do you want to process?'), $queueNames); ->choice($this->t('Which queue do you want to process?'), $queueNames); } return $queueName; Loading
src/Controller/QueueProcessController.php +4 −2 Original line number Diff line number Diff line Loading @@ -15,6 +15,8 @@ use Symfony\Component\HttpFoundation\RedirectResponse; class QueueProcessController implements ContainerInjectionInterface { /** * The QueueUIBatchInterface. * * @var \Drupal\queue_ui\QueueUIBatchInterface */ protected $batch; Loading @@ -30,7 +32,7 @@ class QueueProcessController implements ContainerInjectionInterface { } /** * Process a certain queue * Process a certain queue. */ public function process(string $queueName): ?RedirectResponse { $this->batch->batch([$queueName]); Loading @@ -39,7 +41,7 @@ class QueueProcessController implements ContainerInjectionInterface { } /** * Checks access for processing a certain queue * Checks access for processing a certain queue. */ public function access(AccountProxyInterface $account, string $queueName): AccessResultInterface { return AccessResult::allowedIfHasPermission($account, sprintf('process %s queue', $queueName)); Loading
src/Form/ItemDetailForm.php +1 −1 Original line number Diff line number Diff line Loading @@ -51,7 +51,7 @@ class ItemDetailForm extends FormBase { return new static( $container->get('plugin.manager.queue_ui'), $container->get('renderer'), $container->get('module_handler'), $container->get('module_handler') ); } Loading
src/Form/OverviewForm.php +2 −0 Original line number Diff line number Diff line Loading @@ -81,6 +81,8 @@ class OverviewForm extends FormBase { private $queueUIManager; /** * The QueueUIBatchInterface. * * @var \Drupal\queue_ui\QueueUIBatchInterface */ protected $queueUiBatch; Loading
src/QueueUIBatch.php +1 −1 Original line number Diff line number Diff line Loading @@ -107,7 +107,7 @@ class QueueUIBatch implements QueueUIBatchInterface { $context['finished'] = 0; $context['results']['queueName'] = $info['title']; $title = t('Processing queue %name: %count items remaining', [ $title = $this->t('Processing queue %name: %count items remaining', [ '%name' => $info['title'], '%count' => $num_of_items, ]); Loading