Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. CurrentThemeCondition.php

function CurrentThemeCondition::evaluate

Overrides ConditionInterface::evaluate

File

core/modules/system/src/Plugin/Condition/CurrentThemeCondition.php, line 103

Class

CurrentThemeCondition
Provides a 'Current Theme' condition.

Namespace

Drupal\system\Plugin\Condition

Code

public function evaluate() {
    if (!$this->configuration['theme']) {
        return TRUE;
    }
    return $this->themeManager
        ->getActiveTheme()
        ->getName() == $this->configuration['theme'];
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal