You are here

public function Delete::opDelete in IMCE 8

Same name and namespace in other branches
  1. 8.2 src/Plugin/ImcePlugin/Delete.php \Drupal\imce\Plugin\ImcePlugin\Delete::opDelete()

Operation handler: delete.

File

src/Plugin/ImcePlugin/Delete.php, line 46

Class

Delete
Defines Imce Delete plugin.

Namespace

Drupal\imce\Plugin\ImcePlugin

Code

public function opDelete(ImceFM $fm) {
  $items = $fm
    ->getSelection();
  if ($this
    ->validateDelete($fm, $items)) {
    $this
      ->deleteItems($fm, $items);
  }
}