You are here

public function MediaSubFormManager::__construct in Media Bulk Upload 8

BulkMediaUploadForm constructor.

Parameters

\Drupal\Core\Entity\EntityTypeManagerInterface $entityTypeManager: Entity type manager.

\Drupal\media_bulk_upload\MediaTypeManager $mediaTypeManager: Media Type Manager.

\Drupal\Core\Utility\Token $token: Token service.

Throws

\Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException

\Drupal\Component\Plugin\Exception\PluginNotFoundException

File

src/MediaSubFormManager.php, line 88

Class

MediaSubFormManager
Class MediaSubFormManager.

Namespace

Drupal\media_bulk_upload

Code

public function __construct(EntityTypeManagerInterface $entityTypeManager, MediaTypeManager $mediaTypeManager, Token $token, FileSystemInterface $fileSystem) {
  $this->mediaTypeManager = $mediaTypeManager;
  $this->mediaTypeStorage = $entityTypeManager
    ->getStorage('media_type');
  $this->mediaStorage = $entityTypeManager
    ->getStorage('media');
  $this->entityFormDisplayStorage = $entityTypeManager
    ->getStorage('entity_form_display');
  $this->token = $token;
  $this->defaultMaxFileSize = $this
    ->formatSize(Environment::getUploadMaxSize());
  $this->fileSystem = $fileSystem;
}