Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
dropzonejs
Commits
06201d7d
Commit
06201d7d
authored
Aug 07, 2015
by
Primoz Hmeljak
Browse files
by primsi: addressing review stuff.
parent
2880ac4a
Changes
1
Hide whitespace changes
Inline
Side-by-side
modules/eb_widget/src/Plugin/EntityBrowser/Widget/DropzoneJsEbWidget.php
View file @
06201d7d
...
...
@@ -17,7 +17,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
use
Symfony\Component\EventDispatcher\EventDispatcherInterface
;
/**
*
Uses a view to provide entity listing in a b
rowser
's
widget.
*
Provides an Entity B
rowser widget
that uploads new files
.
*
* @EntityBrowserWidget(
* id = "dropzonejs",
...
...
@@ -54,6 +54,8 @@ class DropzoneJsEbWidget extends WidgetBase {
* Event dispatcher service.
* @param \Drupal\dropzonejs\DropzoneJsUploadSaveInterface $dropzonejs_upload_save
* The upload saving dropzonejs service.
* @param \Drupal\Core\Session\AccountProxyInterface $current_user
* The current user service.
*/
public
function
__construct
(
array
$configuration
,
$plugin_id
,
$plugin_definition
,
EventDispatcherInterface
$event_dispatcher
,
EntityManagerInterface
$entity_manager
,
DropzoneJsUploadSaveInterface
$dropzonejs_upload_save
,
AccountProxyInterface
$current_user
)
{
parent
::
__construct
(
$configuration
,
$plugin_id
,
$plugin_definition
,
$event_dispatcher
,
$entity_manager
);
...
...
@@ -82,6 +84,9 @@ class DropzoneJsEbWidget extends WidgetBase {
public
function
defaultConfiguration
()
{
return
[
'upload_location'
=>
'public://'
,
'dropzone_description'
=>
t
(
'Drop files here to upload them'
),
'max_filesize'
=>
file_upload_max_size
()
/
pow
(
Bytes
::
KILOBYTE
,
2
)
.
'M'
,
'extensions'
=>
'jpg jpeg gif png txt doc xls pdf ppt pps odt ods odp'
,
]
+
parent
::
defaultConfiguration
();
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment