You are here

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

Functio to show the popup maker.

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

File

src/Controller/SettingsController.php, line 139

Class

SettingsController
Settings Controller to the popup maker module.

Namespace

Drupal\popup_maker\Controller

Code

public function show() {
  $config = $this->configFactory
    ->get('popup_maker.settings');
  $settings = [
    'api_key' => $config
      ->get('api_key'),
    'popups' => $config
      ->get('popups'),
    'user' => $config
      ->get('user'),
    'popupSettings' => $config
      ->get('popupSettings'),
  ];
  return [
    '#theme' => 'popup_maker_settings',
    '#settings' => $settings,
    '#token' => $this->csrfToken
      ->get('popup_maker_api_key'),
    '#attached' => [
      'library' => [
        'popup_maker/popup_maker_admin',
      ],
    ],
  ];
}