/** * {@inheritdoc} */ public function getCollection() { if (is_null($this->collection) || !$this->collection instanceof Collection) { $this->collection = \Drupal::service('openlayers.Types')->createInstance('Collection'); $this->collection->import($this->optionsToObjects()); $this->collection->append($this); } return $this->collection; }
/** * {@inheritdoc} */ public function getCollection() { if (!$this->collection instanceof Collection) { $this->collection = \Drupal::service('openlayers.Types')->createInstance('Collection'); $this->collection->append($this); $this->buildCollection(); } return $this->collection; }