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
28
core/lib/Drupal/Core/Serialization/Yaml.php
Normal file
28
core/lib/Drupal/Core/Serialization/Yaml.php
Normal file
|
@ -0,0 +1,28 @@
|
|||
<?php
|
||||
|
||||
namespace Drupal\Core\Serialization;
|
||||
|
||||
use Drupal\Core\Site\Settings;
|
||||
use Drupal\Component\Serialization\Yaml as ComponentYaml;
|
||||
|
||||
/**
|
||||
* Provides a YAML serialization implementation.
|
||||
*
|
||||
* Allow settings to override the YAML implementation resolution.
|
||||
*/
|
||||
class Yaml extends ComponentYaml {
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected static function getSerializer() {
|
||||
// Allow settings.php to override the YAML serializer.
|
||||
if (!isset(static::$serializer) &&
|
||||
$class = Settings::get('yaml_parser_class')) {
|
||||
|
||||
static::$serializer = $class;
|
||||
}
|
||||
return parent::getSerializer();
|
||||
}
|
||||
|
||||
}
|
Reference in a new issue