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

Breadcrumb

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

function YamlDiscovery::findFiles

Returns an array of file paths, keyed by provider.

Return value

array

1 call to YamlDiscovery::findFiles()
YamlDiscovery::findAll in core/lib/Drupal/Component/Discovery/YamlDiscovery.php
Returns an array of discoverable items.

File

core/lib/Drupal/Component/Discovery/YamlDiscovery.php, line 95

Class

YamlDiscovery
Provides discovery for YAML files within a given set of directories.

Namespace

Drupal\Component\Discovery

Code

protected function findFiles() {
    $files = [];
    foreach ($this->directories as $provider => $directory) {
        $file = $directory . '/' . $provider . '.' . $this->name . '.yml';
        if (file_exists($file)) {
            $files[$provider] = $file;
        }
    }
    return $files;
}

API Navigation

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