You are here

public function LanguageCookieConditionPHPSapi::evaluate in Language Cookie 8

Evaluates the condition and returns TRUE or FALSE accordingly.

Return value

bool TRUE if the condition has been met, FALSE otherwise.

Overrides LanguageCookieConditionBase::evaluate

File

src/Plugin/LanguageCookieCondition/LanguageCookieConditionPHPSapi.php, line 22

Class

LanguageCookieConditionPHPSapi
Class for the PHP Sapi condition plugin.

Namespace

Drupal\language_cookie\Plugin\LanguageCookieCondition

Code

public function evaluate() {
  if (PHP_SAPI === 'cli') {
    return $this
      ->block();
  }
  return $this
    ->pass();
}