public function PanopolySearchCondition::evaluate in Panopoly Search 8.2
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/ PanopolySearchCondition.php, line 106
Class
- PanopolySearchCondition
- Condition plugin for testing which Panopoly Search backend is being used.
Namespace
Drupal\panopoly_search\Plugin\ConditionCode
public function evaluate() {
$module = $this->configuration['module'];
if (empty($module)) {
// Make sure the value is always TRUE, even if it's going to be negated.
return $this
->isNegated() ? FALSE : TRUE;
}
return $this->moduleHandler
->moduleExists($module);
}