public function ViewConfiguration::findRequiredModules in Configuration Management 7.2
Overrides Drupal\configuration\Config\Configuration::findRequiredModules().
Overrides CtoolsConfiguration::findRequiredModules
File
- lib/
Drupal/ configuration/ Config/ ViewConfiguration.php, line 45 - Definition of Drupal\configuration\Config\ViewConfiguration.
Class
Namespace
Drupal\configuration\ConfigCode
public function findRequiredModules() {
$this
->addToModules('views');
$view = $this
->getData();
// We get the module that creates the table for the view query.
$schema = drupal_get_schema($view->base_table);
$this
->addToModules($schema['module']);
foreach (views_object_types() as $type => $info) {
foreach ($view->display as $display_id => $display) {
// Views with a display provided by views_content module.
if ($display->display_plugin == 'panel_pane') {
$this
->addToModules('views_content');
}
$view
->set_display($display_id);
foreach ($view->display_handler
->get_handlers($type) as $handler_id => $handler) {
if ($type == 'field') {
if (!empty($handler->field_info) && !empty($handler->field_info['module'])) {
$this
->addToModules($handler->field_info['module']);
}
}
}
}
}
}