public static function DiscoveryInterfaceController::create in Acquia Content Hub 8.2
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
- modules/
acquia_contenthub_curation/ src/ Controller/ DiscoveryInterfaceController.php, line 114
Class
- DiscoveryInterfaceController
- Controller for Content Hub Discovery page.
Namespace
Drupal\acquia_contenthub_curation\ControllerCode
public static function create(ContainerInterface $container) {
/** @var \Drupal\Core\Config\ConfigFactoryInterface $config_factory */
$config_factory = $container
->get('config.factory');
/** @var \Drupal\Core\Language\LanguageManagerInterface $language_manager */
$language_manager = $container
->get('language_manager');
/** @var \Drupal\Core\Access\CsrfTokenGenerator $csrf_token_generator */
$csrf_token_generator = $container
->get('csrf_token');
/** @var \Drupal\Core\Entity\EntityTypeBundleInfoInterface $bundle_info_manager */
$bundle_info_manager = $container
->get('entity_type.bundle.info');
/** @var \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager */
$entity_type_manager = $container
->get('entity_type.manager');
/** @var \Drupal\Core\State\StateInterface $state */
$state = $container
->get('state');
/** @var \Drupal\acquia_contenthub\Client\ClientFactory $client_factory */
$client_factory = $container
->get('acquia_contenthub.client.factory');
/** @var \Drupal\Core\Extension\ModuleExtensionList $module_list */
$module_list = $container
->get('extension.list.module');
return new static($config_factory, $language_manager, $csrf_token_generator, $bundle_info_manager, $entity_type_manager, $state, $client_factory, $module_list);
}