public function AndCondition::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/ AndCondition.php, line 23
Class
- AndCondition
- Filter condition that chains conditions with 'AND'.
Namespace
Drupal\access_filter\Plugin\AccessFilter\ConditionCode
public function isMatched(Request $request) {
foreach ($this->configuration['conditions'] as $condition) {
$instance = $this
->createPluginInstance($condition);
if ($instance && !$instance
->isMatched($request)) {
return FALSE;
}
}
return TRUE;
}