You are here

public function MediaListBuilder::__construct in Drupal 8

Same name and namespace in other branches
  1. 9 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\media

Code

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'));
}