Commit 93cbe5c4 authored by tim.plunkett's avatar tim.plunkett

Remove legacy code for default Views and exportables.

parent f4805c6b
......@@ -92,10 +92,6 @@ public function test_views_trim_text() {
* Tests the dynamic includes of templates via module feature.
*/
function testModuleTemplates() {
$views_status = variable_get('views_defaults', array());
$views_status['frontpage'] = FALSE; // false is enabled
variable_set('views_defaults', $views_status);
$existing = array();
$type = array();
$theme = array();
......
......@@ -25,7 +25,6 @@ protected function setUp() {
// @todo Remove this hack or move it to child classes.
views_init();
views_module_include('views_default', TRUE);
views_get_all_views(TRUE);
menu_router_rebuild();
}
......
......@@ -24,15 +24,8 @@ function views_schema() {
'identifier' => 'view',
'bulk export' => TRUE,
'primary key' => 'vid',
'default hook' => 'views_default_views',
'admin_title' => 'human_name',
'admin_description' => 'description',
'api' => array(
'owner' => 'views',
'api' => 'views_default',
'minimum_version' => '2',
'current_version' => '3.0',
),
'object' => 'Drupal\views\View',
'load all callback' => 'views_get_all_views',
'load callback' => 'views_storage_load',
......
......@@ -2374,45 +2374,6 @@ function views_clean_css_identifier($identifier, $filter = array(' ' => '-', '/'
return $identifier;
}
/**
* Implement hook_views_exportables().
*/
function views_views_exportables($op = 'list', $views = NULL, $name = 'foo') {
$all_views = views_get_all_views();
if ($op == 'list') {
foreach ($all_views as $name => $view) {
// in list, $views is a list of tags.
if (empty($views) || in_array($view->tag, $views)) {
$return[$name] = array(
'name' => check_plain($name),
'desc' => check_plain($view->description),
'tag' => check_plain($view->tag)
);
}
}
return $return;
}
if ($op == 'export') {
$code = "/**\n";
$code .= " * Implement hook_views_default_views().\n";
$code .= " */\n";
$code .= "function " . $name . "_views_default_views() {\n";
foreach ($views as $view => $truth) {
$code .= " /*\n";
$code .= " * View " . var_export($all_views[$view]->name, TRUE) . "\n";
$code .= " */\n";
$code .= $all_views[$view]->export(' ');
$code .= ' $views[$view->name] = $view;' . "\n\n";
}
$code .= " return \$views;\n";
$code .= "}\n";
return $code;
}
}
/**
* #process callback to see if we need to check_plain() the options.
*
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment