function views_config_import_create

Implements hook_config_import_create().

File

drupal/core/modules/views/views.module, line 84
Primarily Drupal hooks and global API functions to manipulate views.

Code

function views_config_import_create($name, $new_config, $old_config) {
  if (strpos($name, 'views.view.') !== 0) {
    return FALSE;
  }
  $view = entity_create('view', $new_config
    ->get());
  $view
    ->save();
  return TRUE;
}