function TypedDataInternalPropertiesHelper::getNonInternalProperties

Same name and namespace in other branches
  1. 11.x core/lib/Drupal/Core/TypedData/TypedDataInternalPropertiesHelper.php \Drupal\Core\TypedData\TypedDataInternalPropertiesHelper::getNonInternalProperties()
  2. 10 core/lib/Drupal/Core/TypedData/TypedDataInternalPropertiesHelper.php \Drupal\Core\TypedData\TypedDataInternalPropertiesHelper::getNonInternalProperties()
  3. 9 core/lib/Drupal/Core/TypedData/TypedDataInternalPropertiesHelper.php \Drupal\Core\TypedData\TypedDataInternalPropertiesHelper::getNonInternalProperties()
  4. 8.9.x core/lib/Drupal/Core/TypedData/TypedDataInternalPropertiesHelper.php \Drupal\Core\TypedData\TypedDataInternalPropertiesHelper::getNonInternalProperties()

Gets an array non-internal properties from a complex data object.

Parameters

\Drupal\Core\TypedData\ComplexDataInterface $data: The complex data object.

Return value

\Drupal\Core\TypedData\TypedDataInterface[] The non-internal properties, keyed by property name.

7 calls to TypedDataInternalPropertiesHelper::getNonInternalProperties()
ComplexDataNormalizer::normalize in core/modules/serialization/src/Normalizer/ComplexDataNormalizer.php
Normalizes data into a set of arrays/scalars.
ContentEntityNormalizer::normalize in core/modules/serialization/src/Normalizer/ContentEntityNormalizer.php
Normalizes data into a set of arrays/scalars.
FieldItemNormalizer::doNormalize in core/modules/jsonapi/src/Normalizer/FieldItemNormalizer.php
Normalizes data into a set of arrays/scalars.
FieldItemNormalizer::getNormalizationSchema in core/modules/jsonapi/src/Normalizer/FieldItemNormalizer.php
Retrieve JSON Schema for the normalization.
ResourceIdentifier::toResourceIdentifier in core/modules/jsonapi/src/JsonApiResource/ResourceIdentifier.php
Creates a ResourceIdentifier object.

... See full list

File

core/lib/Drupal/Core/TypedData/TypedDataInternalPropertiesHelper.php, line 19

Class

TypedDataInternalPropertiesHelper
Helper class for internal properties.

Namespace

Drupal\Core\TypedData

Code

public static function getNonInternalProperties(ComplexDataInterface $data) {
  return array_filter($data->getProperties(TRUE), function (TypedDataInterface $property) {
    return !$property->getDataDefinition()
      ->isInternal();
  });
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.