You are here

function charts_plugin_style_chart::get_children_chart_displays in Charts 7.2

Utility function to check if this chart has children displays.

1 call to charts_plugin_style_chart::get_children_chart_displays()
charts_plugin_style_chart::render in views/charts_plugin_style_chart.inc
Render the entire view from the view result.

File

views/charts_plugin_style_chart.inc, line 373
Contains the Chart style (format) plugin (similar to Table, HTML List, etc.)

Class

charts_plugin_style_chart
Style plugin to render view as a chart.

Code

function get_children_chart_displays() {
  $children_displays = array();
  foreach ($this->view->display as $display_name => $display) {
    $display_enabled = $this->view->display[$display_name]->handler
      ->get_option('enabled');
    if ($display->display_plugin === 'chart' && $display->display_options['parent_display'] && empty($display->deleted) && $display_enabled) {
      $parent_display_name = $display->display_options['parent_display'];
      if ($parent_display_name === $this->view->current_display) {
        $children_displays[$display_name] = $this->view->display[$display_name];
      }
    }
  }
  return $children_displays;
}