function MediaListBuilder::createInstance
Same name in other branches
- 8.9.x core/modules/media/src/MediaListBuilder.php \Drupal\media\MediaListBuilder::createInstance()
- 10 core/modules/media/src/MediaListBuilder.php \Drupal\media\MediaListBuilder::createInstance()
- 11.x core/modules/media/src/MediaListBuilder.php \Drupal\media\MediaListBuilder::createInstance()
Overrides EntityListBuilder::createInstance
File
-
core/
modules/ media/ src/ MediaListBuilder.php, line 64
Class
- MediaListBuilder
- Provides a listing of media items.
Namespace
Drupal\mediaCode
public static function createInstance(ContainerInterface $container, EntityTypeInterface $entity_type) {
$entity_type_manager = $container->get('entity_type.manager');
return new static($entity_type, $entity_type_manager->getStorage($entity_type->id()), $container->get('date.formatter'), $container->get('language_manager'), $entity_type_manager->getStorage('image_style'));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.