You are here

public static function Openlayers::loadAllAsOptions in Openlayers 7.3

Gets a list of Openlayers exportable.

Parameters

string $type: The plugin .

Return value

array Openlayers object instance.

21 calls to Openlayers::loadAllAsOptions()
Autopopup::optionsForm in src/Plugin/Component/Autopopup/Autopopup.php
@TODO What is this return? If it is the form, why is form by reference?
Cluster::optionsForm in src/Plugin/Source/Cluster/Cluster.php
@TODO What is this return? If it is the form, why is form by reference?
GeofieldWidget::optionsForm in modules/openlayers_geofield/src/Plugin/Component/GeofieldWidget/GeofieldWidget.php
@TODO What is this return? If it is the form, why is form by reference?
ImageVector::optionsForm in src/Plugin/Source/ImageVector/ImageVector.php
@TODO What is this return? If it is the form, why is form by reference?
LayerSwitcher::optionsForm in src/Plugin/Control/LayerSwitcher/LayerSwitcher.php
@TODO What is this return? If it is the form, why is form by reference?

... See full list

File

src/Openlayers.php, line 44
Contains Openlayers.

Class

Openlayers
Class Openlayers.

Namespace

Drupal\openlayers

Code

public static function loadAllAsOptions($type = NULL) {
  $options = array();
  $type = drupal_ucfirst(drupal_strtolower($type));
  foreach (Openlayers::loadAllExportable($type) as $machine_name => $data) {
    if (is_object($data)) {
      $options[$machine_name] = $data->name;
    }
  }
  return $options;
}