protected function MediaEntityDropzoneJsEbWidget::handleWidgetContext in DropzoneJS 8.2
Overrides DropzoneJsEbWidget::handleWidgetContext
File
- modules/
eb_widget/ src/ Plugin/ EntityBrowser/ Widget/ MediaEntityDropzoneJsEbWidget.php, line 178
Class
- MediaEntityDropzoneJsEbWidget
- Provides an Entity Browser widget that uploads media entities.
Namespace
Drupal\dropzonejs_eb_widget\Plugin\EntityBrowser\WidgetCode
protected function handleWidgetContext($widget_context) {
parent::handleWidgetContext($widget_context);
$bundle = $this
->getType();
$source = $bundle
->getSource();
$field = $source
->getSourceFieldDefinition($bundle);
$field_storage = $field
->getFieldStorageDefinition();
$this->configuration['upload_location'] = $field_storage
->getSettings()['uri_scheme'] . '://' . $field
->getSettings()['file_directory'];
$this->configuration['max_filesize'] = $field
->getSettings()['max_filesize'];
$this->configuration['extensions'] = $field
->getSettings()['file_extensions'];
}