function BlockListBuilder::getThemeName

Same name and namespace in other branches
  1. 9 core/modules/block/src/BlockListBuilder.php \Drupal\block\BlockListBuilder::getThemeName()
  2. 10 core/modules/block/src/BlockListBuilder.php \Drupal\block\BlockListBuilder::getThemeName()
  3. 11.x core/modules/block/src/BlockListBuilder.php \Drupal\block\BlockListBuilder::getThemeName()

Gets the name of the theme used for this block listing.

Return value

string The name of the theme.

1 call to BlockListBuilder::getThemeName()
BlockListBuilder::buildBlocksForm in core/modules/block/src/BlockListBuilder.php
Builds the main "Blocks" portion of the form.

File

core/modules/block/src/BlockListBuilder.php, line 330

Class

BlockListBuilder
Defines a class to build a listing of block entities.

Namespace

Drupal\block

Code

protected function getThemeName() {
    // If no theme was specified, use the current theme.
    if (!$this->theme) {
        $this->theme = $this->themeManager
            ->getActiveTheme()
            ->getName();
    }
    return $this->theme;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.