You are here

ConfigFieldItemNormalizerValue.php in JSON:API 8

File

src/Normalizer/Value/ConfigFieldItemNormalizerValue.php
View source
<?php

namespace Drupal\jsonapi\Normalizer\Value;


/**
 * Helps normalize config entity "fields" in compliance with the JSON API spec.
 *
 * @internal
 */
class ConfigFieldItemNormalizerValue extends FieldItemNormalizerValue {

  /**
   * {@inheritdoc}
   *
   * @var mixed
   */
  protected $raw;

  /**
   * Instantiate a ConfigFieldItemNormalizerValue object.
   *
   * @param mixed $values
   *   The normalized result.
   */
  public function __construct($values) {
    $this->raw = $values;
  }

  /**
   * {@inheritdoc}
   */
  public function rasterizeValue() {
    return $this
      ->rasterizeValueRecursive($this->raw);
  }

}

Classes

Namesort descending Description
ConfigFieldItemNormalizerValue Helps normalize config entity "fields" in compliance with the JSON API spec.