You are here

public function ModalHelpController::enableBootstrapAutomatically in Modal 4.0.x

Same name and namespace in other branches
  1. 4.1.x src/Controller/ModalHelpController.php \Drupal\modal_page\Controller\ModalHelpController::enableBootstrapAutomatically()
1 string reference to 'ModalHelpController::enableBootstrapAutomatically'
modal_page.routing.yml in ./modal_page.routing.yml
modal_page.routing.yml

File

src/Controller/ModalHelpController.php, line 117

Class

ModalHelpController
Controller routines for help routes.

Namespace

Drupal\modal_page\Controller

Code

public function enableBootstrapAutomatically() {
  $settings = $this->configFactory
    ->getEditable('modal_page.settings');
  $verifyLoadBootstrapAutomatically = $settings
    ->get('verify_load_bootstrap_automatically');
  if (empty($verifyLoadBootstrapAutomatically)) {
    echo FALSE;
    exit;
  }
  $settings
    ->set('load_bootstrap', TRUE);
  $settings
    ->save();
  echo TRUE;
  exit;
}