You are here

public function ContextGroupsManager::getCurrentTheme in Context groups 8

Same name and namespace in other branches
  1. 8.2 src/ContextGroupsManager.php \Drupal\context_groups\ContextGroupsManager::getCurrentTheme()

Get current selected theme in reactions.

Parameters

FormStateInterface $form_state: FormState object.

Return value

string Return selected theme.

1 call to ContextGroupsManager::getCurrentTheme()
ContextGroupsManager::getParams in src/ContextGroupsManager.php
Get list of context groups from specified context.

File

src/ContextGroupsManager.php, line 98

Class

ContextGroupsManager
Class ContextGroupsManager.

Namespace

Drupal\context_groups

Code

public function getCurrentTheme(FormStateInterface $form_state) {
  if (!empty($form_state
    ->getUserInput()['reactions']['blocks']['theme'])) {
    $theme = $form_state
      ->getUserInput()['reactions']['blocks']['theme'];
  }
  else {
    $theme = $this->themeHandler
      ->getDefault();
  }
  return $theme;
}