public function ModuleEnabled::evaluate in Varbase Total Control Dashboard 9.0.x
Same name and namespace in other branches
- 8.6 src/Plugin/Condition/ModuleEnabled.php \Drupal\varbase_total_control\Plugin\Condition\ModuleEnabled::evaluate()
- 8 src/Plugin/Condition/ModuleEnabled.php \Drupal\varbase_total_control\Plugin\Condition\ModuleEnabled::evaluate()
- 8.5 src/Plugin/Condition/ModuleEnabled.php \Drupal\varbase_total_control\Plugin\Condition\ModuleEnabled::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
- src/
Plugin/ Condition/ ModuleEnabled.php, line 66
Class
- ModuleEnabled
- Provides a 'Module' condition.
Namespace
Drupal\varbase_total_control\Plugin\ConditionCode
public function evaluate() {
if (!trim($this->configuration['module'])) {
return TRUE;
}
$moduleHandler = \Drupal::service('module_handler');
return (bool) $moduleHandler
->moduleExists($this->configuration['module']);
}