You are here

protected function D3ViewsLibraryInfoProcessor::hash in d3.js 7

Ensure there are hashes in form_element arrays.

Could potentially go in parent class.

1 call to D3ViewsLibraryInfoProcessor::hash()
D3ViewsLibraryInfoProcessor::postProcessMeta in modules/d3_views/includes/D3ViewsLibraryInfoProcessor.inc

File

modules/d3_views/includes/D3ViewsLibraryInfoProcessor.inc, line 35

Class

D3ViewsLibraryInfoProcessor
D3 Views custom Library info processor.

Code

protected function hash($element) {
  foreach ($element as $key => $value) {
    if (strpos($key, '#') === FALSE) {
      $element['#' . $key] = $value;
      unset($element[$key]);
    }
  }
  return $element;
}