public function QueueHandler::__construct in Salesforce Suite 8.4
Same name and namespace in other branches
- 8.3 modules/salesforce_pull/src/QueueHandler.php \Drupal\salesforce_pull\QueueHandler::__construct()
- 5.0.x modules/salesforce_pull/src/QueueHandler.php \Drupal\salesforce_pull\QueueHandler::__construct()
QueueHandler constructor.
Parameters
\Drupal\salesforce\Rest\RestClientInterface $sfapi: Salesforce service.
\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: Entity type manager service.
\Drupal\Core\Queue\QueueDatabaseFactory $queue_factory: Queue service.
\Drupal\Core\Config\ConfigFactoryInterface $config: Config service.
\Symfony\Component\EventDispatcher\EventDispatcherInterface $event_dispatcher: Event dispatcher service.
\Drupal\Component\Datetime\TimeInterface $time: Time service.
Throws
\Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException
\Drupal\Component\Plugin\Exception\PluginNotFoundException
File
- modules/
salesforce_pull/ src/ QueueHandler.php, line 91
Class
- QueueHandler
- Handles pull cron queue set up.
Namespace
Drupal\salesforce_pullCode
public function __construct(RestClientInterface $sfapi, EntityTypeManagerInterface $entity_type_manager, QueueDatabaseFactory $queue_factory, ConfigFactoryInterface $config, EventDispatcherInterface $event_dispatcher, TimeInterface $time) {
$this->sfapi = $sfapi;
$this->queue = $queue_factory
->get(self::PULL_QUEUE_NAME);
$this->config = $config
->get('salesforce.settings');
$this->eventDispatcher = $event_dispatcher;
$this->time = $time;
$this->mappings = $entity_type_manager
->getStorage('salesforce_mapping')
->loadCronPullMappings();
}