function Map::getProperties

Same name in other branches
  1. 9 core/lib/Drupal/Core/TypedData/Plugin/DataType/Map.php \Drupal\Core\TypedData\Plugin\DataType\Map::getProperties()
  2. 8.9.x core/lib/Drupal/Core/TypedData/Plugin/DataType/Map.php \Drupal\Core\TypedData\Plugin\DataType\Map::getProperties()
  3. 11.x core/lib/Drupal/Core/TypedData/Plugin/DataType/Map.php \Drupal\Core\TypedData\Plugin\DataType\Map::getProperties()

Overrides ComplexDataInterface::getProperties

5 calls to Map::getProperties()
LayoutSectionItem::__get in core/modules/layout_builder/src/Plugin/Field/FieldType/LayoutSectionItem.php
Magic method: Gets a property value.
Map::applyDefaultValue in core/lib/Drupal/Core/TypedData/Plugin/DataType/Map.php
Applies the default value.
Map::getIterator in core/lib/Drupal/Core/TypedData/Plugin/DataType/Map.php
Map::getString in core/lib/Drupal/Core/TypedData/Plugin/DataType/Map.php
Returns a string representation of the data.
Map::toArray in core/lib/Drupal/Core/TypedData/Plugin/DataType/Map.php
Returns an array of all property values.

File

core/lib/Drupal/Core/TypedData/Plugin/DataType/Map.php, line 162

Class

Map
The "map" data type.

Namespace

Drupal\Core\TypedData\Plugin\DataType

Code

public function getProperties($include_computed = FALSE) {
    $properties = [];
    foreach ($this->definition
        ->getPropertyDefinitions() as $name => $definition) {
        if ($include_computed || !$definition->isComputed()) {
            $properties[$name] = $this->get($name);
        }
    }
    return $properties;
}

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