You are here

public function TrailingSlashOutboundPathProcessor::isAdminPath in Trailing Slash 8

Parameters

$path:

$options:

Return value

bool

1 call to TrailingSlashOutboundPathProcessor::isAdminPath()
TrailingSlashOutboundPathProcessor::isPathWithTrailingSlash in src/PathProcessor/TrailingSlashOutboundPathProcessor.php

File

src/PathProcessor/TrailingSlashOutboundPathProcessor.php, line 109

Class

TrailingSlashOutboundPathProcessor
Class TrailingSlashOutboundPathProcessor.

Namespace

Drupal\trailing_slash\PathProcessor

Code

public function isAdminPath($path, $options) : bool {
  if (strpos($path, '/admin') === 0 || strpos($path, '/devel') === 0) {
    return TRUE;
  }
  if (!empty($options['route'])) {
    return $this->adminContext
      ->isAdminRoute($options['route']);
  }
  return FALSE;
}