public function Collection::import in Openlayers 7.3
Import a flat list of Openlayers Objects.
Parameters
ObjectInterface[] $import: The array of objects to import.
File
- src/
Types/ Collection.php, line 35 - Class Collection.
Class
- Collection
- Class Collection.
Namespace
Drupal\openlayers\TypesCode
public function import(array $import = array()) {
array_walk($import, function (ObjectInterface $object_to_add) {
$dependencies = $object_to_add
->getCollection()
->getFlatList();
array_walk($dependencies, function (ObjectInterface $object_dependency) {
$this
->append($object_dependency);
});
$this
->append($object_to_add);
});
}