class TypedDataInternalPropertiesHelper

Same name in other branches
  1. 8.9.x core/lib/Drupal/Core/TypedData/TypedDataInternalPropertiesHelper.php \Drupal\Core\TypedData\TypedDataInternalPropertiesHelper
  2. 10 core/lib/Drupal/Core/TypedData/TypedDataInternalPropertiesHelper.php \Drupal\Core\TypedData\TypedDataInternalPropertiesHelper
  3. 11.x core/lib/Drupal/Core/TypedData/TypedDataInternalPropertiesHelper.php \Drupal\Core\TypedData\TypedDataInternalPropertiesHelper

Helper class for internal properties.

Hierarchy

Expanded class hierarchy of TypedDataInternalPropertiesHelper

8 files declare their use of TypedDataInternalPropertiesHelper
ComplexDataNormalizer.php in core/modules/serialization/src/Normalizer/ComplexDataNormalizer.php
ContentEntityNormalizer.php in core/modules/serialization/src/Normalizer/ContentEntityNormalizer.php
ContentEntityNormalizer.php in core/modules/hal/src/Normalizer/ContentEntityNormalizer.php
FieldItemNormalizer.php in core/modules/jsonapi/src/Normalizer/FieldItemNormalizer.php
FieldItemNormalizer.php in core/modules/hal/src/Normalizer/FieldItemNormalizer.php

... See full list

File

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

Namespace

Drupal\Core\TypedData
View source
class TypedDataInternalPropertiesHelper {
    
    /**
     * Gets an array non-internal properties from a complex data object.
     *
     * @param \Drupal\Core\TypedData\ComplexDataInterface $data
     *   The complex data object.
     *
     * @return \Drupal\Core\TypedData\TypedDataInterface[]
     *   The non-internal properties, keyed by property name.
     */
    public static function getNonInternalProperties(ComplexDataInterface $data) {
        return array_filter($data->getProperties(TRUE), function (TypedDataInterface $property) {
            return !$property->getDataDefinition()
                ->isInternal();
        });
    }

}

Members

Title Sort descending Modifiers Object type Summary
TypedDataInternalPropertiesHelper::getNonInternalProperties public static function Gets an array non-internal properties from a complex data object.

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