You are here

public function WeMegaMenuAdminController::styleOfBackendWeMegaMenu in Drupal Mega Menu 8.x

Same name and namespace in other branches
  1. 8 src/Controller/WeMegaMenuAdminController.php \Drupal\we_megamenu\Controller\WeMegaMenuAdminController::styleOfBackendWeMegaMenu()

A function set style backend.

1 string reference to 'WeMegaMenuAdminController::styleOfBackendWeMegaMenu'
we_megamenu.routing.yml in ./we_megamenu.routing.yml
we_megamenu.routing.yml

File

src/Controller/WeMegaMenuAdminController.php, line 129

Class

WeMegaMenuAdminController
Controller routines for block example routes.

Namespace

Drupal\we_megamenu\Controller

Code

public function styleOfBackendWeMegaMenu() {
  if (isset($_POST['type'])) {
    \Drupal::state()
      ->set('we_megamenu_backend_style', $_POST['type']);
    we_megamenu_flush_render_cache();
  }
  exit;
}