TypedDataInternalPropertiesHelper.php

Same filename and directory in other branches
  1. 9 core/lib/Drupal/Core/TypedData/TypedDataInternalPropertiesHelper.php
  2. 10 core/lib/Drupal/Core/TypedData/TypedDataInternalPropertiesHelper.php
  3. 11.x core/lib/Drupal/Core/TypedData/TypedDataInternalPropertiesHelper.php

Namespace

Drupal\Core\TypedData

File

core/lib/Drupal/Core/TypedData/TypedDataInternalPropertiesHelper.php

View source
<?php

namespace Drupal\Core\TypedData;


/**
 * Helper class for internal properties.
 */
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();
        });
    }

}

Classes

Title Deprecated Summary
TypedDataInternalPropertiesHelper Helper class for internal properties.

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