Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. AllowToolbarPath.php

function AllowToolbarPath::check

Overrides RequestPolicyInterface::check

File

core/modules/toolbar/src/PageCache/AllowToolbarPath.php, line 19

Class

AllowToolbarPath
Cache policy for the toolbar page cache service.

Namespace

Drupal\toolbar\PageCache

Code

public function check(Request $request) {
    // Note that this regular expression matches the end of pathinfo in order to
    // support multilingual sites using path prefixes.
    if (preg_match('#/toolbar/subtrees/[^/]+(/[^/]+)?$#', $request->getPathInfo())) {
        return static::ALLOW;
    }
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal