Update to Drupal 8.0.0-rc3. For more information, see https://www.drupal.org/node/2608078
This commit is contained in:
parent
6419a031d7
commit
4afb23bbd3
762 changed files with 20080 additions and 6368 deletions
|
@ -24,14 +24,14 @@ class JsonEncoder extends SymfonyJsonEncoder {
|
|||
protected $format = 'hal_json';
|
||||
|
||||
/**
|
||||
* Overrides \Symfony\Component\Serializer\Encoder\JsonEncoder::supportsEncoding()
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function supportsEncoding($format) {
|
||||
return $format == $this->format;
|
||||
}
|
||||
|
||||
/**
|
||||
* Overrides \Symfony\Component\Serializer\Encoder\JsonEncoder::supportsDecoding()
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function supportsDecoding($format) {
|
||||
return $format == $this->format;
|
||||
|
|
|
@ -61,7 +61,7 @@ class ContentEntityNormalizer extends NormalizerBase {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implements \Symfony\Component\Serializer\Normalizer\NormalizerInterface::normalize()
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function normalize($entity, $format = NULL, array $context = array()) {
|
||||
$context += array(
|
||||
|
|
|
@ -52,7 +52,7 @@ class EntityReferenceItemNormalizer extends FieldItemNormalizer implements UuidR
|
|||
}
|
||||
|
||||
/**
|
||||
* Implements \Symfony\Component\Serializer\Normalizer\NormalizerInterface::normalize()
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function normalize($field_item, $format = NULL, array $context = array()) {
|
||||
/** @var $field_item \Drupal\Core\Field\FieldItemInterface */
|
||||
|
@ -97,7 +97,7 @@ class EntityReferenceItemNormalizer extends FieldItemNormalizer implements UuidR
|
|||
}
|
||||
|
||||
/**
|
||||
* Overrides \Drupal\hal\Normalizer\FieldItemNormalizer::constructValue().
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function constructValue($data, $context) {
|
||||
$field_item = $context['target_instance'];
|
||||
|
@ -111,7 +111,7 @@ class EntityReferenceItemNormalizer extends FieldItemNormalizer implements UuidR
|
|||
}
|
||||
|
||||
/**
|
||||
* Implements \Drupal\serialization\EntityResolver\UuidReferenceInterface::getUuid().
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getUuid($data) {
|
||||
if (isset($data['uuid'])) {
|
||||
|
|
|
@ -23,7 +23,7 @@ class FieldItemNormalizer extends NormalizerBase {
|
|||
protected $supportedInterfaceOrClass = 'Drupal\Core\Field\FieldItemInterface';
|
||||
|
||||
/**
|
||||
* Implements \Symfony\Component\Serializer\Normalizer\NormalizerInterface::normalize()
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function normalize($field_item, $format = NULL, array $context = array()) {
|
||||
$values = $field_item->toArray();
|
||||
|
@ -42,7 +42,7 @@ class FieldItemNormalizer extends NormalizerBase {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implements \Symfony\Component\Serializer\Normalizer\DenormalizerInterface::denormalize()
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function denormalize($data, $class, $format = NULL, array $context = array()) {
|
||||
if (!isset($context['target_instance'])) {
|
||||
|
|
|
@ -23,7 +23,7 @@ class FieldNormalizer extends NormalizerBase {
|
|||
protected $supportedInterfaceOrClass = 'Drupal\Core\Field\FieldItemListInterface';
|
||||
|
||||
/**
|
||||
* Implements \Symfony\Component\Serializer\Normalizer\NormalizerInterface::normalize()
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function normalize($field, $format = NULL, array $context = array()) {
|
||||
$normalized_field_items = array();
|
||||
|
@ -58,7 +58,7 @@ class FieldNormalizer extends NormalizerBase {
|
|||
|
||||
|
||||
/**
|
||||
* Implements \Symfony\Component\Serializer\Normalizer\DenormalizerInterface::denormalize()
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function denormalize($data, $class, $format = NULL, array $context = array()) {
|
||||
if (!isset($context['target_instance'])) {
|
||||
|
|
|
@ -23,14 +23,14 @@ abstract class NormalizerBase extends SerializationNormalizerBase implements Den
|
|||
protected $formats = array('hal_json');
|
||||
|
||||
/**
|
||||
* Implements \Symfony\Component\Serializer\Normalizer\NormalizerInterface::supportsNormalization().
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function supportsNormalization($data, $format = NULL) {
|
||||
return in_array($format, $this->formats) && parent::supportsNormalization($data, $format);
|
||||
}
|
||||
|
||||
/**
|
||||
* Implements \Symfony\Component\Serializer\Normalizer\DenormalizerInterface::supportsDenormalization()
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function supportsDenormalization($data, $type, $format = NULL) {
|
||||
if (in_array($format, $this->formats) && (class_exists($this->supportedInterfaceOrClass) || interface_exists($this->supportedInterfaceOrClass))) {
|
||||
|
|
Reference in a new issue