You are here

public function MediaEntityDropzoneJsEbWidget::calculateDependencies in DropzoneJS 8.2

Same name and namespace in other branches
  1. 8 modules/eb_widget/src/Plugin/EntityBrowser/Widget/MediaEntityDropzoneJsEbWidget.php \Drupal\dropzonejs_eb_widget\Plugin\EntityBrowser\Widget\MediaEntityDropzoneJsEbWidget::calculateDependencies()

File

modules/eb_widget/src/Plugin/EntityBrowser/Widget/MediaEntityDropzoneJsEbWidget.php, line 118

Class

MediaEntityDropzoneJsEbWidget
Provides an Entity Browser widget that uploads media entities.

Namespace

Drupal\dropzonejs_eb_widget\Plugin\EntityBrowser\Widget

Code

public function calculateDependencies() {
  $dependencies = parent::calculateDependencies();

  // Depend on the media type this widget creates.
  $media_type = $this
    ->getType();
  $dependencies[$media_type
    ->getConfigDependencyKey()][] = $media_type
    ->getConfigDependencyName();
  $dependencies['module'][] = 'media';
  return $dependencies;
}