public function MediaLibraryUiBuilder::__construct in Drupal 8
Same name and namespace in other branches
- 9 core/modules/media_library/src/MediaLibraryUiBuilder.php \Drupal\media_library\MediaLibraryUiBuilder::__construct()
Constructs a MediaLibraryUiBuilder instance.
Parameters
\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager.
\Symfony\Component\HttpFoundation\RequestStack $request_stack: The request stack.
\Drupal\views\ViewExecutableFactory $views_executable_factory: The views executable factory.
\Drupal\Core\Form\FormBuilderInterface $form_builder: The currently active request object.
\Drupal\media_library\OpenerResolverInterface $opener_resolver: The opener resolver.
File
- core/
modules/ media_library/ src/ MediaLibraryUiBuilder.php, line 76
Class
- MediaLibraryUiBuilder
- Service which builds the media library.
Namespace
Drupal\media_libraryCode
public function __construct(EntityTypeManagerInterface $entity_type_manager, RequestStack $request_stack, ViewExecutableFactory $views_executable_factory, FormBuilderInterface $form_builder, OpenerResolverInterface $opener_resolver = NULL) {
$this->entityTypeManager = $entity_type_manager;
$this->request = $request_stack
->getCurrentRequest();
$this->viewsExecutableFactory = $views_executable_factory;
$this->formBuilder = $form_builder;
if (!$opener_resolver) {
@trigger_error('The media_library.opener_resolver service must be passed to ' . __METHOD__ . ' and will be required before Drupal 9.0.0.', E_USER_DEPRECATED);
$opener_resolver = \Drupal::service('media_library.opener_resolver');
}
$this->openerResolver = $opener_resolver;
}