protected function hasActivePatterns()
{
foreach ($this->patterns as $pattern) {
$path = $this->getRequest()->getPathInfo();
if (is_array($pattern)) {
foreach ($pattern as $p) {
$isActive = preg_match('/' . $p . '/i', $path);
}
} else {
$isActive = preg_match('/' . $pattern . '/i', $path);
}
if ($isActive) {
return true;
}
}
return false;
}