function fe_block_boxes_features_export_options in Features Extra 6
Same name and namespace in other branches
- 7 fe_block/fe_block.module \fe_block_boxes_features_export_options()
Implementation of hook_features_export_options().
File
- ./
fe_block.module, line 181
Code
function fe_block_boxes_features_export_options() {
$table = 'fe_block_boxes';
$options = array();
// Defaults.
$schema = ctools_export_get_schema($table);
$export = $schema['export'];
$defaults = _ctools_export_get_defaults($table, $export);
foreach ($defaults as $obj) {
$options[$obj->machine_name] = t('@name [@machine_name]', array(
'@name' => $obj->info,
'@machine_name' => $obj->machine_name,
));
}
// Normals.
$query = "SELECT * FROM {{$table}} {$table} INNER JOIN {boxes} b ON b.bid = {$table}.bid ORDER BY b.bid ASC";
$result = db_query($query);
while ($obj = db_fetch_object($result)) {
$options[$obj->machine_name] = t('@name [@machine_name]', array(
'@name' => $obj->info,
'@machine_name' => $obj->machine_name,
));
}
ksort($options);
return $options;
}