public function MediaListBuilder::__construct in Drupal 9
Same name and namespace in other branches
- 8 core/modules/media/src/MediaListBuilder.php \Drupal\media\MediaListBuilder::__construct()
- 10 core/modules/media/src/MediaListBuilder.php \Drupal\media\MediaListBuilder::__construct()
Constructs a new MediaListBuilder object.
Parameters
\Drupal\Core\Entity\EntityTypeInterface $entity_type: The entity type definition.
\Drupal\Core\Entity\EntityStorageInterface $storage: The entity storage class.
\Drupal\Core\Datetime\DateFormatterInterface $date_formatter: The date formatter service.
\Drupal\Core\Language\LanguageManagerInterface $language_manager: The language manager service.
\Drupal\Core\Entity\EntityStorageInterface $image_style_storage: The entity storage class for image styles.
Overrides EntityListBuilder::__construct
File
- core/
modules/ media/ src/ MediaListBuilder.php, line 53
Class
- MediaListBuilder
- Provides a listing of media items.
Namespace
Drupal\mediaCode
public function __construct(EntityTypeInterface $entity_type, EntityStorageInterface $storage, DateFormatterInterface $date_formatter, LanguageManagerInterface $language_manager, EntityStorageInterface $image_style_storage) {
parent::__construct($entity_type, $storage);
$this->dateFormatter = $date_formatter;
$this->languageManager = $language_manager;
$this->thumbnailStyleExists = !empty($image_style_storage
->load('thumbnail'));
}