Overrides ConditionInterface::evaluate
public function evaluate() { if (empty($this->configuration['roles']) && !$this->isNegated()) { return TRUE; } $user = $this->getContextValue('user'); return (bool) array_intersect($this->configuration['roles'], $user->getRoles()); }