function Map::get

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

File

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

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.