Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. PropertyNormalizerContextBuilder.php

class PropertyNormalizerContextBuilder

A helper providing autocompletion for available PropertyNormalizer options.

@author Mathias Arlaud <mathias.arlaud@gmail.com>

Hierarchy

  • class \Symfony\Component\Serializer\Context\Normalizer\AbstractNormalizerContextBuilder implements \Symfony\Component\Serializer\Context\ContextBuilderInterface uses \Symfony\Component\Serializer\Context\ContextBuilderTrait
    • class \Symfony\Component\Serializer\Context\Normalizer\AbstractObjectNormalizerContextBuilder extends \Symfony\Component\Serializer\Context\Normalizer\AbstractNormalizerContextBuilder
      • class \Symfony\Component\Serializer\Context\Normalizer\PropertyNormalizerContextBuilder extends \Symfony\Component\Serializer\Context\Normalizer\AbstractObjectNormalizerContextBuilder

Expanded class hierarchy of PropertyNormalizerContextBuilder

File

vendor/symfony/serializer/Context/Normalizer/PropertyNormalizerContextBuilder.php, line 21

Namespace

Symfony\Component\Serializer\Context\Normalizer
View source
final class PropertyNormalizerContextBuilder extends AbstractObjectNormalizerContextBuilder {
    
    /**
     * Configures whether fields should be output based on visibility.
     */
    public function withNormalizeVisibility(int $normalizeVisibility) : static {
        return $this->with(PropertyNormalizer::NORMALIZE_VISIBILITY, $normalizeVisibility);
    }

}

Members

Title Sort descending Deprecated Modifiers Object type Summary
AbstractNormalizerContextBuilder::withAllowExtraAttributes public function If AbstractNormalizer::ATTRIBUTES are specified, and the source has fields that are not part of that list,
configures whether to ignore those attributes or throw an ExtraAttributesException.
AbstractNormalizerContextBuilder::withAttributes public function Configures attributes to (de)normalize.
AbstractNormalizerContextBuilder::withCallbacks public function Configures an hashmap of field name =&gt; callable to normalize this field.
AbstractNormalizerContextBuilder::withCircularReferenceHandler public function Configures an handler to call when a circular reference has been detected.
AbstractNormalizerContextBuilder::withCircularReferenceLimit public function Configures how many loops of circular reference to allow while normalizing.
AbstractNormalizerContextBuilder::withDefaultConstructorArguments public function Configures a hashmap of classes containing hashmaps of constructor argument =&gt; default value.
AbstractNormalizerContextBuilder::withDefaultContructorArguments Deprecated public function
AbstractNormalizerContextBuilder::withGroups public function Configures groups containing attributes to (de)normalize.
AbstractNormalizerContextBuilder::withIgnoredAttributes public function Configures attributes to be skipped when normalizing an object tree.
AbstractNormalizerContextBuilder::withObjectToPopulate public function Configures an object to be updated instead of creating a new instance.
AbstractNormalizerContextBuilder::withRequireAllProperties public function Configures requiring all properties to be listed in the input instead
of falling back to null for nullable ones.
AbstractObjectNormalizerContextBuilder::withDeepObjectToPopulate public function Configures whether to tell the denormalizer to also populate existing objects on
attributes of the main object.
AbstractObjectNormalizerContextBuilder::withDepthKeyPattern public function Configures a pattern to keep track of the current depth.
AbstractObjectNormalizerContextBuilder::withDisableTypeEnforcement public function Configures whether verifying types match during denormalization.
AbstractObjectNormalizerContextBuilder::withEnableMaxDepth public function Configures whether to respect the max depth metadata on fields.
AbstractObjectNormalizerContextBuilder::withExcludeFromCacheKeys public function Configures which context key are not relevant to determine which attributes
of an object to (de)normalize.
AbstractObjectNormalizerContextBuilder::withMaxDepthHandler public function Configures a callback to allow to set a value for an attribute when the max depth has
been reached.
AbstractObjectNormalizerContextBuilder::withPreserveEmptyObjects public function Configures whether an empty object should be kept as an object (in
JSON: {}) or converted to a list (in JSON: []).
AbstractObjectNormalizerContextBuilder::withSkipNullValues public function Configures whether fields with the value `null` should be output during normalization.
AbstractObjectNormalizerContextBuilder::withSkipUninitializedValues public function Configures whether uninitialized typed class properties should be excluded during normalization.
ContextBuilderTrait::$context private property
ContextBuilderTrait::toArray public function
ContextBuilderTrait::with protected function
ContextBuilderTrait::withContext public function
PropertyNormalizerContextBuilder::withNormalizeVisibility public function Configures whether fields should be output based on visibility.
RSS feed
Powered by Drupal