public function CurrentThemeCondition::evaluate in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/system/src/Plugin/Condition/CurrentThemeCondition.php \Drupal\system\Plugin\Condition\CurrentThemeCondition::evaluate()
Evaluates the condition and returns TRUE or FALSE accordingly.
Return value
bool TRUE if the condition has been met, FALSE otherwise.
Overrides ConditionInterface::evaluate
File
- core/
modules/ system/ src/ Plugin/ Condition/ CurrentThemeCondition.php, line 107 - Contains \Drupal\system\Plugin\Condition\CurrentThemeCondition.
Class
- CurrentThemeCondition
- Provides a 'Current Theme' condition.
Namespace
Drupal\system\Plugin\ConditionCode
public function evaluate() {
if (!$this->configuration['theme']) {
return TRUE;
}
return $this->themeManager
->getActiveTheme()
->getName() == $this->configuration['theme'];
}