You are here

public function SimplePopupBlocksController::delete in Simple Popup Blocks 8

Same name and namespace in other branches
  1. 8.2 src/Controller/SimplePopupBlocksController.php \Drupal\simple_popup_blocks\Controller\SimplePopupBlocksController::delete()

Delete page controller.

1 string reference to 'SimplePopupBlocksController::delete'
simple_popup_blocks.routing.yml in ./simple_popup_blocks.routing.yml
simple_popup_blocks.routing.yml

File

src/Controller/SimplePopupBlocksController.php, line 144

Class

SimplePopupBlocksController
Controller routines for manage page routes.

Namespace

Drupal\simple_popup_blocks\Controller

Code

public function delete($first) {
  $result = SimplePopupBlocksStorage::delete($first, $this->database);
  if ($result) {
    $this->messenger
      ->addMessage($this
      ->t('Successfully deleted the popup settings.'));
  }
  return $this
    ->redirect('simple_popup_blocks.manage');
}