function cis_helper_draw_chart_alter

cis7 cis_helper.module cis_helper_draw_chart_alter(&$settings)

Implements hook_draw_chart_alter().

File

profiles/cis/modules/custom/cis_helper/cis_helper.module, line 303
Workflow and functionality glue based on the structure of the CIS.

Code

function cis_helper_draw_chart_alter(&$settings) {
  $dept_charts = array('historical-college-data-page-4', 'historical-college-data-page-6');
  foreach ($dept_charts as $view_name) {
    if (isset($settings['chart'][$view_name])) {
      foreach ($settings['chart'][$view_name]['header'] as $record) {
        $data = db_select('field_data_field_abbreviation', 'fdfa')->fields('fdfa', array('entity_id'))->condition('field_abbreviation_value', substr($record, 0, strpos($record, ' (')))->execute()->fetchObject();
        if (isset($data->entity_id)) {
          $dept = node_load($data->entity_id);
          if (isset($dept->field_color[LANGUAGE_NONE][0]['jquery_colorpicker'])) {
            $colors[] = $dept->field_color[LANGUAGE_NONE][0]['jquery_colorpicker'];
          }
        }
      }
      $settings['chart'][$view_name]['options']['colors'] = $colors;
    }
  }
}
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.