You are here

protected function ChartsGraphsGoogleCharts::_encode_user_parameters 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::_encode_user_parameters()

Pushes user defined parameters over any parameters defined by the class.

I.e., the user defined parameters overwrite any parameters defined elsewhere. We don't make any processing on these parameters. They are outputed exactly as sent. The user is responsable for urlenconding this data.

If the user wants to simply unset some parameter, it can do it senting the parameter with a NULL value.

1 call to ChartsGraphsGoogleCharts::_encode_user_parameters()
ChartsGraphsGoogleCharts::_get_url in apis/charts_graphs_google_charts/charts_graphs_google_charts.class.inc

File

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

Class

ChartsGraphsGoogleCharts
Implementation of abstract class ChartsGraphsCanvas for Google Charts library.

Code

protected function _encode_user_parameters() {
  if (is_array($this->parameters)) {
    foreach ($this->parameters as $key => $value) {
      if ($value === NULL) {
        unset($this->parameters_to_send[$key]);
      }
      else {
        $this->parameters_to_send[$key] = $value;
      }
    }
  }
}