NullFieldNormalizerValue.php in JSON:API 8
File
src/Normalizer/Value/NullFieldNormalizerValue.php
View source
<?php
namespace Drupal\jsonapi\Normalizer\Value;
use Drupal\Core\Access\AccessResultInterface;
use Drupal\jsonapi\Normalizer\CacheableDependencyTrait;
class NullFieldNormalizerValue implements FieldNormalizerValueInterface {
use CacheableDependencyTrait;
protected $propertyType;
public function __construct(AccessResultInterface $field_access_result, $property_type) {
assert($property_type === 'attributes' || $property_type === 'relationships');
$this
->setCacheability($field_access_result);
$this->propertyType = $property_type;
}
public function getIncludes() {
return [];
}
public function getPropertyType() {
return $this->propertyType;
}
public function rasterizeValue() {
return NULL;
}
public function rasterizeIncludes() {
return [];
}
public function getAllIncludes() {
return NULL;
}
}