You are here

public function TBMegaMenuBlock::getThemeName in The Better Mega Menu 2.x

Same name and namespace in other branches
  1. 8 src/Plugin/Block/TBMegaMenuBlock.php \Drupal\tb_megamenu\Plugin\Block\TBMegaMenuBlock::getThemeName()

Get the current Theme Name.

Return value

string The current theme name.

1 call to TBMegaMenuBlock::getThemeName()
TBMegaMenuBlock::build in src/Plugin/Block/TBMegaMenuBlock.php
Builds and returns the renderable array for this block plugin.

File

src/Plugin/Block/TBMegaMenuBlock.php, line 147

Class

TBMegaMenuBlock
Provides blocks which belong to TB Mega Menu.

Namespace

Drupal\tb_megamenu\Plugin\Block

Code

public function getThemeName() {
  if (!isset($this->themeName)) {
    $this->themeName = $this->themeManager
      ->getActiveTheme()
      ->getName();
  }
  return $this->themeName;
}