You are here

public function SkinYamlDirectoryDiscovery::__construct in Skinr 8.2

Same name in this branch
  1. 8.2 src/Plugin/Discovery/SkinYamlDirectoryDiscovery.php \Drupal\skinr\Plugin\Discovery\SkinYamlDirectoryDiscovery::__construct()
  2. 8.2 src/Component/Discovery/SkinYamlDirectoryDiscovery.php \Drupal\skinr\Component\Discovery\SkinYamlDirectoryDiscovery::__construct()

Constructs a YamlDirectoryDiscovery object.

Parameters

array $directories: An array of directories to scan, keyed by the provider.

string $file_cache_key_suffix: The file cache key suffix. This should be unique for each type of discovery.

string $key: (optional) The key contained in the discovered data that identifies it. Defaults to 'id'.

Overrides YamlDiscovery::__construct

File

src/Plugin/Discovery/SkinYamlDirectoryDiscovery.php, line 43
Contains \Drupal\skinr\Plugin\Discovery\SkinYamlDirectoryDiscovery.

Class

SkinYamlDirectoryDiscovery
Allows YAML files to define plugin definitions.

Namespace

Drupal\skinr\Plugin\Discovery

Code

public function __construct(array $directories, $file_cache_key_suffix, $key = 'id') {

  // Intentionally does not call parent constructor as this class uses a
  // different YAML discovery.
  $this->discovery = new ComponentSkinYamlDirectoryDiscovery($directories, $file_cache_key_suffix, $key);
}