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

Breadcrumb

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

function FileLocator::locate

File

vendor/symfony/http-kernel/Config/FileLocator.php, line 30

Class

FileLocator
FileLocator uses the KernelInterface to locate resources in bundles.

Namespace

Symfony\Component\HttpKernel\Config

Code

public function locate(string $file, ?string $currentPath = null, bool $first = true) : string|array {
    if (isset($file[0]) && '@' === $file[0]) {
        $resource = $this->kernel
            ->locateResource($file);
        return $first ? $resource : [
            $resource,
        ];
    }
    return parent::locate($file, $currentPath, $first);
}

API Navigation

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