public static function ContentHubExportQueueController::create in Acquia Content Hub 8
Instantiates a new instance of this class.
This is a factory method that returns a new instance of this class. The factory should pass any needed dependencies into the constructor of this class, but not the container itself. Every call to this method must return a new instance of this class; that is, it may not implement a singleton.
Parameters
\Symfony\Component\DependencyInjection\ContainerInterface $container: The service container this instance should use.
Overrides ControllerBase::create
File
- src/
Controller/ ContentHubExportQueueController.php, line 63
Class
- ContentHubExportQueueController
- Implements an Export Queue Controller for Content Hub.
Namespace
Drupal\acquia_contenthub\ControllerCode
public static function create(ContainerInterface $container) {
/** @var \Drupal\Core\Queue\QueueFactory $queue_factory */
$queue_factory = $container
->get('queue');
/** @var \Drupal\Core\Queue\QueueWorkerManager $queue_manager */
$queue_manager = $container
->get('plugin.manager.queue_worker');
/** @var \Drupal\Core\Config\ConfigFactoryInterface $config_factory */
$config_factory = $container
->get('config.factory');
/** @var \Drupal\Core\Logger\LoggerChannelFactoryInterface $logger_factory */
$logger_factory = $container
->get('logger.factory');
return new static($queue_factory, $queue_manager, $config_factory, $logger_factory);
}