Closed (fixed)
Project:
Strongarm
Version:
6.x-2.0
Component:
Documentation
Priority:
Minor
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
10 Aug 2010 at 20:30 UTC
Updated:
25 Aug 2010 at 09:00 UTC
I am betting the answer is yes if one implements the proper ctools exportable hooks and returns (or alters) the proper object. I am just not sure how to do this.
For example, I experimented with the below code snippet which resulted in the following error "warning: Attempt to assign property of non-object in .../sites/all/modules/contrib/ctools/includes/export.inc on line 554."
function mymodule_ctools_plugin_api($module, $api) {
if ($module == 'strongarm') {
return array('version' => 1);
}
}
/**
* Implementation of hook_strongarm().
*/
function mymodule_strongarm() {
return array('site_name' => 'My website');
}
Currently, most module related data on my existing website (including views, panels, imagecache, etc..) is being exported to code using pretty well documented techniques. I am just not 100% ready to move to the Features paradigm.
Thanks,
~jake
Comments
Comment #1
yhahn commentedIf you turn on the CTools Bulk Export module it will provide a simple form for selecting and exporting CTools exportable components.
Comment #2
jrockowitz commentedyhahn,
Thank you for your quick response. You saved me a lot of frustration... I was staring at so much code that I forgot about the bulk exporter.
Just in case someone else makes the same mistake, below are the code tweaks I needed to make to my hook_strongarm() implementation so that my variables array would be returned as an array of ctools compatible object.
Strongarm 1.x
Strongarm 2.x