public function ChartsPluginStyleChart::getChildrenChartDisplays in Charts 5.0.x
Same name and namespace in other branches
- 8.4 src/Plugin/views/style/ChartsPluginStyleChart.php \Drupal\charts\Plugin\views\style\ChartsPluginStyleChart::getChildrenChartDisplays()
- 8 src/Plugin/views/style/ChartsPluginStyleChart.php \Drupal\charts\Plugin\views\style\ChartsPluginStyleChart::getChildrenChartDisplays()
- 8.3 src/Plugin/views/style/ChartsPluginStyleChart.php \Drupal\charts\Plugin\views\style\ChartsPluginStyleChart::getChildrenChartDisplays()
Utility function to check if this chart has children displays.
Return value
array Children Chart Display.
1 call to ChartsPluginStyleChart::getChildrenChartDisplays()
- ChartsPluginStyleChart::render in src/
Plugin/ views/ style/ ChartsPluginStyleChart.php - Render the display in this style.
File
- src/
Plugin/ views/ style/ ChartsPluginStyleChart.php, line 445
Class
- ChartsPluginStyleChart
- Style plugin to render view as a chart.
Namespace
Drupal\charts\Plugin\views\styleCode
public function getChildrenChartDisplays() {
$children_displays = $this->displayHandler
->getAttachedDisplays();
foreach ($children_displays as $key => $child) {
$display_handler = $this->view->displayHandlers
->get($child);
// Unset disabled & non chart attachments.
if (!$display_handler
->isEnabled() || strstr($child, 'chart_extension') == !TRUE) {
unset($children_displays[$key]);
}
}
$children_displays = array_values($children_displays);
return $children_displays;
}