protected function SkinYamlDirectoryDiscovery::getIdentifier in Skinr 8.2
Gets the identifier from the data.
Parameters
array $data: The data from the YAML file.
Return value
string The identifier from the data.
File
- src/
Component/ Discovery/ SkinYamlDirectoryDiscovery.php, line 108 - Contains \Drupal\skinr\Component\Discovery\SkinYamlDirectoryDiscovery.
Class
- SkinYamlDirectoryDiscovery
- Discovers multiple YAML files in a set of directories.
Namespace
Drupal\skinr\Component\DiscoveryCode
protected function getIdentifier($file, array $data) {
if (!isset($data[$this->key])) {
throw new SkinDiscoveryException("The {$file} contains no data in the identifier key '{$this->key}'");
}
return $data[$this->key];
}