You are here

protected function ChartsGraphsGoogleCharts::_get_encoded_value in Charts and Graphs 6.2

Same name and namespace in other branches
  1. 7 apis/charts_graphs_google_charts/charts_graphs_google_charts.class.inc \ChartsGraphsGoogleCharts::_get_encoded_value()

File

apis/charts_graphs_google_charts/charts_graphs_google_charts.class.inc, line 326
Implementation of abstract class ChartsGraphsCanvas for Google Charts library.

Class

ChartsGraphsGoogleCharts
Implementation of abstract class ChartsGraphsCanvas for Google Charts library.

Code

protected function _get_encoded_value($value) {
  if (is_array($value)) {
    $encoded_value = '';
    foreach ($value as $val) {
      $encoded_value .= '|' . $this
        ->_get_encoded_value($val);
    }
    if (strlen($encoded_value)) {
      $encoded_value = substr($encoded_value, 1);
    }
  }
  else {
    $encoded_value = drupal_urlencode($value);
  }
  return $encoded_value;
}