You are here

public function TranscodeJobDeleteForm::submitForm in Video 8.2

Delete the entity and log the event. logger() replaces the watchdog.

Overrides ContentEntityForm::submitForm

File

modules/video_transcode/src/Form/TranscodeJobDeleteForm.php, line 44

Class

TranscodeJobDeleteForm
Provides a form for deleting a trnascode job entity.

Namespace

Drupal\video_transcode\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $entity = $this
    ->getEntity();
  $entity
    ->delete();
  $this
    ->logger('video_transcode')
    ->notice('@type: deleted %title.', array(
    '@type' => $this->entity
      ->bundle(),
    '%title' => $this->entity
      ->label(),
  ));
  $form_state
    ->setRedirect('entity.video_transcode_job.collection');
}