You are here

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

To update the popup.

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

File

src/Controller/SettingsController.php, line 164

Class

SettingsController
Settings Controller to the popup maker module.

Namespace

Drupal\popup_maker\Controller

Code

public function updatePopup() {
  $id = $_POST['id'];
  $config = $this->configFactory
    ->getEditable('popup_maker.settings');
  $popupSettings = $config
    ->get('popupSettings');
  $popupSettings[$id]['displayOptions'] = $_POST['sgpm_rules'];
  $config
    ->set('popupSettings', $popupSettings)
    ->save();
  return $this
    ->redirect('popup_maker.settings.edit_popup_settings', [
    'id' => $id,
  ]);
}