public function MapItem::__get in Drupal 8
Same name and namespace in other branches
- 9 core/lib/Drupal/Core/Field/Plugin/Field/FieldType/MapItem.php \Drupal\Core\Field\Plugin\Field\FieldType\MapItem::__get()
Magic method: Gets a property value.
Parameters
string $property_name: The name of the property to get; e.g., 'title' or 'name'.
Return value
mixed The property value.
Throws
\InvalidArgumentException If a not existing property is accessed.
Overrides FieldItemBase::__get
File
- core/
lib/ Drupal/ Core/ Field/ Plugin/ Field/ FieldType/ MapItem.php, line 82
Class
- MapItem
- Defines the 'map' entity field type.
Namespace
Drupal\Core\Field\Plugin\Field\FieldTypeCode
public function __get($name) {
if (!isset($this->values[$name])) {
$this->values[$name] = [];
}
return $this->values[$name];
}