public function PhotosEditController::deleteImage in Album Photos 8.4
Delete image from gallery and site.
File
- src/
Controller/ PhotosEditController.php, line 196
Class
- PhotosEditController
- Edit images and image details.
Namespace
Drupal\photos\ControllerCode
public function deleteImage($file) {
$fid = $file;
$confirm_delete_form = $this->formBuilder
->getForm('\\Drupal\\photos\\Form\\PhotosImageConfirmDeleteForm', $fid);
if ($this->moduleHandler
->moduleExists('colorbox_load')) {
// Dispaly form in modal popup.
// @todo does this still work? Test colorbox_load module.
print $this->renderer
->render($confirm_delete_form);
}
else {
// Render full page.
return $confirm_delete_form;
}
}