Update to Drupal 8.0.0-beta15. For more information, see: https://www.drupal.org/node/2563023
This commit is contained in:
parent
2720a9ec4b
commit
f3791f1da3
1898 changed files with 54300 additions and 11481 deletions
|
@ -30,6 +30,10 @@ services:
|
|||
arguments: ['Drupal\Core\Field\Plugin\Field\FieldType\PasswordItem']
|
||||
tags:
|
||||
- { name: normalizer, priority: 20 }
|
||||
serializer.normalizer.safe_string:
|
||||
class: Drupal\serialization\Normalizer\SafeStringNormalizer
|
||||
tags:
|
||||
- { name: normalizer }
|
||||
serializer.normalizer.typed_data:
|
||||
class: Drupal\serialization\Normalizer\TypedDataNormalizer
|
||||
tags:
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\serialization\Normalizer\SafeStringNormalizer.
|
||||
*/
|
||||
|
||||
namespace Drupal\serialization\Normalizer;
|
||||
|
||||
/**
|
||||
* Normalizes SafeStringInterface objects into a string.
|
||||
*/
|
||||
class SafeStringNormalizer extends NormalizerBase {
|
||||
|
||||
/**
|
||||
* The interface or class that this Normalizer supports.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $supportedInterfaceOrClass = array('Drupal\Component\Utility\SafeStringInterface');
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function normalize($object, $format = NULL, array $context = array()) {
|
||||
return (string) $object;
|
||||
}
|
||||
|
||||
}
|
Reference in a new issue