You are here

public function SettingsController::refreshPopups in Popup Maker - All popup types 8

To refresh the popups.

1 string reference to 'SettingsController::refreshPopups'
popup_maker.routing.yml in ./popup_maker.routing.yml
popup_maker.routing.yml

File

src/Controller/SettingsController.php, line 181

Class

SettingsController
Settings Controller to the popup maker module.

Namespace

Drupal\popup_maker\Controller

Code

public function refreshPopups() {
  $config = $this->configFactory
    ->get('popup_maker.settings');
  if ($this
    ->refreshData($config
    ->get('api_key'))) {
    $this->messenger
      ->addStatus('Popups list refreshed successfully');
  }
  return $this
    ->redirect('popup_maker.settings');
}