Active
Project:
Drush System Manager
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
4 Mar 2012 at 10:47 UTC
Updated:
4 Mar 2012 at 10:47 UTC
It's not possible to export ctools exporables easily without features.
With the following drush command
drush php-script ../ctools.drush.inc > export.blob.txt
and script file ../ctools.drush.inc
ctools_include('export');
$schemas = ctools_export_get_schemas(TRUE);
$exportables = $export_tables = array();
foreach ($schemas as $table => $schema) {
if (!empty($schema['export']['list callback']) && function_exists($schema['export']['list callback'])) {
$exportables[$table] = $schema['export']['list callback']();
}
else {
$exportables[$table] = ctools_export_default_list($table, $schema);
}
natcasesort($exportables[$table]);
$export_tables[$table] = $schema['module'];
}
//print_r($schemas);
//print_r($exportables);
//print_r($export_tables);
echo "===================\n";
//print_r(array_keys($schemas));
foreach ($exportables as $exportable => $exportable_items) {
$names = array_keys( $exportable_items);
if (!empty($names)) {
$code = array();
$table = $exportable;// $export_tables[$exportable];
ctools_export_to_hook_code(&$code, $table, $names);
print_r( $code);
}
}
we can stuff code into a vcs. This needs some work like sorting of $schema and $names to have a better grasp of changing stuff.