namespace Drupal\system\Plugin\Condition;
-use Drupal\Component\Utility\Unicode;
use Drupal\Core\Condition\ConditionPluginBase;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Path\AliasManagerInterface;
public function evaluate() {
// Convert path to lowercase. This allows comparison of the same path
// with different case. Ex: /Page, /page, /PAGE.
- $pages = Unicode::strtolower($this->configuration['pages']);
+ $pages = mb_strtolower($this->configuration['pages']);
if (!$pages) {
return TRUE;
}
$path = $this->currentPath->getPath($request);
// Do not trim a trailing slash if that is the complete path.
$path = $path === '/' ? $path : rtrim($path, '/');
- $path_alias = Unicode::strtolower($this->aliasManager->getAliasByPath($path));
+ $path_alias = mb_strtolower($this->aliasManager->getAliasByPath($path));
return $this->pathMatcher->matchPath($path_alias, $pages) || (($path != $path_alias) && $this->pathMatcher->matchPath($path, $pages));
}