You are here

public function ServerEnvironmentCondition::isMatched in Access Filter 8

Checks the current access is matched to the condition.

Parameters

\Symfony\Component\HttpFoundation\Request $request: A request instance.

Return value

bool Boolean TRUE if condition is matched or FALSE otherwise.

Overrides ConditionInterface::isMatched

File

src/Plugin/AccessFilter/Condition/ServerEnvironmentCondition.php, line 24

Class

ServerEnvironmentCondition
Filter condition using server environment value.

Namespace

Drupal\access_filter\Plugin\AccessFilter\Condition

Code

public function isMatched(Request $request) {
  return $this
    ->isMatchedWithArray($_SERVER);
}