public function MediaBulkUploadForm::__construct in Media Bulk Upload 8
BulkMediaUploadForm constructor.
Parameters
\Drupal\Core\Entity\EntityTypeManagerInterface $entityTypeManager: Entity type manager.
\Drupal\media_bulk_upload\MediaSubFormManager $mediaSubFormManager: Media Sub Form Manager.
\Drupal\Core\Session\AccountProxyInterface $currentUser: Current User.
\Drupal\Core\Messenger\MessengerInterface $messenger: The messenger.
Throws
\Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException
\Drupal\Component\Plugin\Exception\PluginNotFoundException
File
- src/
Form/ MediaBulkUploadForm.php, line 97
Class
- MediaBulkUploadForm
- Class BulkMediaUploadForm.
Namespace
Drupal\media_bulk_upload\FormCode
public function __construct(EntityTypeManagerInterface $entityTypeManager, MediaSubFormManager $mediaSubFormManager, AccountProxyInterface $currentUser, MessengerInterface $messenger) {
$this->mediaTypeStorage = $entityTypeManager
->getStorage('media_type');
$this->mediaBulkConfigStorage = $entityTypeManager
->getStorage('media_bulk_config');
$this->mediaStorage = $entityTypeManager
->getStorage('media');
$this->fileStorage = $entityTypeManager
->getStorage('file');
$this->maxFileSizeForm = Environment::getUploadMaxSize();
$this->mediaSubFormManager = $mediaSubFormManager;
$this->currentUser = $currentUser;
$this->messenger = $messenger;
}