public function MapItem::toArray in Zircon Profile 8.0
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Field/Plugin/Field/FieldType/MapItem.php \Drupal\Core\Field\Plugin\Field\FieldType\MapItem::toArray()
Returns an array of all property values.
Gets an array of plain property values including all not-computed properties.
Return value
array An array of property values, keyed by property name.
Throws
\Drupal\Core\TypedData\Exception\MissingDataException If the complex data structure is unset and no property can be created.
Overrides Map::toArray
File
- core/
lib/ Drupal/ Core/ Field/ Plugin/ Field/ FieldType/ MapItem.php, line 51 - Contains \Drupal\Core\Field\Plugin\Field\FieldType\MapItem.
Class
- MapItem
- Defines the 'map' entity field type.
Namespace
Drupal\Core\Field\Plugin\Field\FieldTypeCode
public function toArray() {
// The default implementation of toArray() only returns known properties.
// For a map, return everything as the properties are not pre-defined.
return $this
->getValue();
}