function Map::get

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

Overrides ComplexDataInterface::get

1 call to Map::get()
Map::getProperties in core/lib/Drupal/Core/TypedData/Plugin/DataType/Map.php
Gets an array of property objects.

File

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

Class

Map
The "map" data type.

Namespace

Drupal\Core\TypedData\Plugin\DataType

Code

public function get($property_name) {
    if (!isset($this->properties[$property_name])) {
        $value = NULL;
        if (isset($this->values[$property_name])) {
            $value = $this->values[$property_name];
        }
        // If the property is unknown, this will throw an exception.
        $this->properties[$property_name] = $this->getTypedDataManager()
            ->getPropertyInstance($this, $property_name, $value);
    }
    return $this->properties[$property_name];
}

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