public function NodeImportController::snpDeleteNode in Simple Node Importer 8
Function to abort the import.
1 string reference to 'NodeImportController::snpDeleteNode'
File
- src/
Controller/ NodeImportController.php, line 474
Class
- NodeImportController
- Default controller for the simple_node_importer module.
Namespace
Drupal\simple_node_importer\ControllerCode
public function snpDeleteNode($option, $node) {
if ($node) {
$storage_handler = \Drupal::entityTypeManager()
->getStorage("node");
$entity = $storage_handler
->load($node);
$storage_handler
->delete([
$entity,
]);
$response = new RedirectResponse('/node/add/simple_node');
return $response
->send();
}
}