Update to Drupal 8.2.0. For more information, see https://www.drupal.org/project/drupal/releases/8.2.0
This commit is contained in:
parent
2f563ab520
commit
f1c8716f57
1732 changed files with 52334 additions and 11780 deletions
22
core/lib/Drupal/Core/Discovery/YamlDiscovery.php
Normal file
22
core/lib/Drupal/Core/Discovery/YamlDiscovery.php
Normal file
|
@ -0,0 +1,22 @@
|
|||
<?php
|
||||
|
||||
namespace Drupal\Core\Discovery;
|
||||
|
||||
use Drupal\Component\Discovery\YamlDiscovery as ComponentYamlDiscovery;
|
||||
use Drupal\Core\Serialization\Yaml;
|
||||
|
||||
/**
|
||||
* Provides discovery for YAML files within a given set of directories.
|
||||
*
|
||||
* This overrides the Component file decoding with the Core YAML implementation.
|
||||
*/
|
||||
class YamlDiscovery extends ComponentYamlDiscovery {
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function decode($file) {
|
||||
return Yaml::decode(file_get_contents($file)) ?: [];
|
||||
}
|
||||
|
||||
}
|
Reference in a new issue