Skip to content

Instantly share code, notes, and snippets.

@lkacenja
Created June 17, 2014 19:32
Show Gist options
  • Save lkacenja/72fb1b96bfbd3e735b13 to your computer and use it in GitHub Desktop.
Save lkacenja/72fb1b96bfbd3e735b13 to your computer and use it in GitHub Desktop.
<?php
function data_engine_node_view($node, $view_mode, $langcode) {
if ($node->type == 'indicator') {
$indicator_values = data_engine_indicator_values($node);
$dmetro_codes = data_engine_metro_denver_org_codes();
$dmetro_values = array();
foreach($indicator_values as $key => $info) {
if (array_key_exists($info->district_number, $dmetro_codes)) {
$dmetro_values[] = array(
'organization_name' => $dmetro_codes[$info->district_number],
'per_prof___adv' => $info->per_prof___adv,
'district_number' => $info->district_number,
);
}
}
dsm($dmetro_values);
}
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment