You are here

public function MediaEntityDropzoneJsEbWidget::calculateDependencies in DropzoneJS 8

Same name and namespace in other branches
  1. 8.2 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 146

Class

MediaEntityDropzoneJsEbWidget
Provides an Entity Browser widget that uploads uploads media entities.

Namespace

Drupal\dropzonejs_eb_widget\Plugin\EntityBrowser\Widget

Code

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

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