public static function Openlayers::getOLObjectsOptions in Openlayers 7.3
Gets a list of available plugin types.
Parameters
string $object_type: The plugin type.
Return value
array Openlayers objects types options.
6 calls to Openlayers::getOLObjectsOptions()
- openlayers_component_form_type in modules/
openlayers_ui/ src/ Plugin/ export_ui/ OpenlayersComponents.inc - Component type config form handler.
- openlayers_control_form_type in modules/
openlayers_ui/ src/ Plugin/ export_ui/ OpenlayersControls.inc - Control type config form handler.
- openlayers_interaction_form_type in modules/
openlayers_ui/ src/ Plugin/ export_ui/ OpenlayersInteractions.inc - Interaction type config form handler.
- openlayers_layer_form_type in modules/
openlayers_ui/ src/ Plugin/ export_ui/ OpenlayersLayers.inc - Layer type config form handler.
- openlayers_source_form_type in modules/
openlayers_ui/ src/ Plugin/ export_ui/ OpenlayersSources.inc - Source type config form handler.
File
- src/
Openlayers.php, line 24 - Contains Openlayers.
Class
- Openlayers
- Class Openlayers.
Namespace
Drupal\openlayersCode
public static function getOLObjectsOptions($object_type) {
$options = array();
$service_basename = 'openlayers.' . $object_type;
foreach (\Drupal::service($service_basename)
->getDefinitions() as $data) {
$name = isset($data['label']) ? $data['label'] : $data['id'];
$options[$service_basename . ':' . $data['id']] = $name;
}
asort($options);
return $options;
}