You are here

public function DropzoneMediaEntityCreateEvent::__construct in DropzoneJS 8

Same name and namespace in other branches
  1. 8.2 src/Events/DropzoneMediaEntityCreateEvent.php \Drupal\dropzonejs\Events\DropzoneMediaEntityCreateEvent::__construct()

DropzoneMediaEntityCreateEvent constructor.

Parameters

\Drupal\media_entity\MediaInterface $media_entity: The media entity being created.

\Drupal\file\FileInterface $file: The file that will be used for the media entity.

array $form: The form that contains the Dropzone element.

\Drupal\Core\Form\FormStateInterface $form_state: The form state.

array $element: The Dropzone form element.

File

src/Events/DropzoneMediaEntityCreateEvent.php, line 64

Class

DropzoneMediaEntityCreateEvent
Represents Media Entity creation as an event when using DropzoneJS.

Namespace

Drupal\dropzonejs\Events

Code

public function __construct(MediaInterface $media_entity, FileInterface $file, array $form, FormStateInterface $form_state, array $element) {
  $this->mediaEntity = $media_entity;
  $this->file = $file;
  $this->form = $form;
  $this->formState = $form_state;
  $this->element = $element;
}