public function BucketJobManager::__construct in TMGMT Translator Smartling 8.3
Same name and namespace in other branches
- 8.4 src/Smartling/BucketJobManager.php \Drupal\tmgmt_smartling\Smartling\BucketJobManager::__construct()
BucketJobManager constructor.
Parameters
\Psr\Log\LoggerInterface $logger:
\Drupal\tmgmt_smartling\Smartling\SmartlingApiWrapper $api_wrapper:
\Drupal\tmgmt_smartling\Smartling\ConfigManager\SmartlingConfigManager $config_manager:
\Drupal\Core\Extension\ModuleHandlerInterface $module_handler:
\Drupal\tmgmt_extension_suit\Utils\UniqueQueueItem $unique_queue_item_util:
\Drupal\Core\Config\ConfigFactoryInterface $config_factory:
File
- src/
Smartling/ BucketJobManager.php, line 58 - BucketJobManager.
Class
- BucketJobManager
- Class BucketJobManager.
Namespace
Drupal\tmgmt_smartling\SmartlingCode
public function __construct(LoggerInterface $logger, SmartlingApiWrapper $api_wrapper, SmartlingConfigManager $config_manager, ModuleHandlerInterface $module_handler, UniqueQueueItem $unique_queue_item_util, ConfigFactoryInterface $config_factory) {
$this->logger = $logger;
$this->apiWrapper = $api_wrapper;
$this->moduleHandler = $module_handler;
$this->uniqueQueueItemUtil = $unique_queue_item_util;
// Pick up first available Smartling provider settings.
$smartling_provider = $config_manager
->getAvailableConfigs();
if (!empty($smartling_provider)) {
$this->settings = $smartling_provider[0]
->get('settings');
$this->apiWrapper
->setSettings($this->settings);
}
}