You are here

function _openlayers_views_clean in Openlayers 6

Format names so that they can be more easily used by Views.

Parameters

$dirty_name: String to manipulate

Return value

Manipulated string

1 call to _openlayers_views_clean()
openlayers_views_style_map::render in modules/openlayers_views/views/openlayers_views_style_map.inc
Renders views (map)

File

modules/openlayers_views/views/openlayers_views_style_map.inc, line 676
This file holds style plugin for OpenLayers Views

Code

function _openlayers_views_clean($dirty_name = '') {
  $cleaning = strip_tags($dirty_name);
  $cleaning = drupal_strtolower(str_replace(' ', '_', $cleaning));
  $cleaning = preg_replace("/[^a-z0-9_.]+/i", "", $cleaning);
  return $cleaning;
}