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

Breadcrumb

  1. Drupal Core 11.1.x

DirectoryWithMetadataPluginDiscovery.php

Namespace

Drupal\Core\Plugin\Discovery

File

core/lib/Drupal/Core/Plugin/Discovery/DirectoryWithMetadataPluginDiscovery.php

View source
<?php

namespace Drupal\Core\Plugin\Discovery;

use Drupal\Core\File\FileSystemInterface;

/**
 * Discover directories that contain a specific metadata file.
 */
class DirectoryWithMetadataPluginDiscovery extends YamlDiscovery {
    
    /**
     * Constructs a DirectoryWithMetadataPluginDiscovery object.
     *
     * @param array $directories
     *   An array of directories to scan, keyed by the provider. The value can
     *   either be a string or an array of strings. The string values should be
     *   the path of a directory to scan.
     * @param string $file_cache_key_suffix
     *   The file cache key suffix. This should be unique for each type of
     *   discovery.
     * @param \Drupal\Core\File\FileSystemInterface $file_system
     *   The file system service.
     */
    public function __construct(array $directories, $file_cache_key_suffix, FileSystemInterface $file_system) {
        // Intentionally does not call parent constructor as this class uses a
        // different YAML discovery.
        $this->discovery = new DirectoryWithMetadataDiscovery($directories, $file_cache_key_suffix, $file_system);
    }

}

Classes

Title Deprecated Summary
DirectoryWithMetadataPluginDiscovery Discover directories that contain a specific metadata file.

API Navigation

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