You are here

public static function SmartlingTranslatorUi::getSmartlingQueuesDefinitions in TMGMT Translator Smartling 8.3

Same name and namespace in other branches
  1. 8.4 src/SmartlingTranslatorUi.php \Drupal\tmgmt_smartling\SmartlingTranslatorUi::getSmartlingQueuesDefinitions()
  2. 8.2 src/SmartlingTranslatorUi.php \Drupal\tmgmt_smartling\SmartlingTranslatorUi::getSmartlingQueuesDefinitions()

Returns Smartling queues definitions.

Return value

array

2 calls to SmartlingTranslatorUi::getSmartlingQueuesDefinitions()
RequestSubscriber::init in src/EventSubscriber/RequestSubscriber.php
Reacts on page load event.
SmartlingTranslatorUi::buildConfigurationForm in src/SmartlingTranslatorUi.php
Form constructor.

File

src/SmartlingTranslatorUi.php, line 464
Contains \Drupal\tmgmt_smartling\SmartlingTranslatorUi.

Class

SmartlingTranslatorUi
Smartling translator UI.

Namespace

Drupal\tmgmt_smartling

Code

public static function getSmartlingQueuesDefinitions() {
  return array_filter(\Drupal::service('plugin.manager.queue_worker')
    ->getDefinitions(), function ($worker) {
    return in_array($worker['id'], [
      'tmgmt_extension_suit_download',
      'tmgmt_extension_suit_check_status',
      'tmgmt_extension_suit_upload',
      'smartling_context_upload',
    ]);
  });
}