/** * Constructs a new View object. * * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id * The plugin_id for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Symfony\Component\EventDispatcher\EventDispatcherInterface $event_dispatcher * Event dispatcher service. * @param \Drupal\Core\Session\AccountInterface $current_user * The current user. */ public function __construct(array $configuration, $plugin_id, $plugin_definition, EventDispatcherInterface $event_dispatcher, EntityManagerInterface $entity_manager, AccountInterface $current_user) { parent::__construct($configuration, $plugin_id, $plugin_definition, $event_dispatcher, $entity_manager); $this->currentUser = $current_user; }
/** * Constructs widget plugin. * * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id * The plugin_id for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Symfony\Component\EventDispatcher\EventDispatcherInterface $event_dispatcher * 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); $this->dropzoneJsUploadSave = $dropzonejs_upload_save; $this->currentUser = $current_user; }