You are here

public function FilebrowserDeleteForm::submit in Filebrowser 8

File

lib/Drupal/filebrowser/Entity/Form/FilebrowserDeleteForm.php, line 35
Contains \Drupal\filebrowser\Entity\Form\FilebrowserDeleteForm

Class

FilebrowserDeleteForm
Provides Confirmation form when deleting filebrowser content

Namespace

Drupal\ffilebrowser\Entity\Form

Code

public function submit(array $form, array &$form_state) {
  $this->entity
    ->delete();
  watchdog('content', '@type: deleted %title.', array(
    '@type' => $this->entity
      ->bundle(),
    '%title' => $this->entity
      ->label(),
  ));
  $form_state['redirect_route']['route_name'] = 'filebrowser.list';
}