function picture_admin_export_form in Picture 7
Export mappings.
1 string reference to 'picture_admin_export_form'
- picture_menu in ./
picture.module - Implements hook_menu().
File
- ./
picture.admin.inc, line 137 - Picture - map breakpoints and image styles
Code
function picture_admin_export_form($form, &$form_state, $mappings_name) {
// Create the export code textarea.
ctools_include('export');
$mapping = picture_mapping_load($mappings_name);
if (!$mapping) {
$mapping = new stdClass();
}
$export = ctools_export_object('picture_mapping', $mapping);
$form['mapping_export'] = array(
'#type' => 'textarea',
'#title' => t('Mapping code'),
'#rows' => count(explode("\n", $export)),
'#default_value' => $export,
'#weight' => -1,
'#description' => t('<strong>Warning!</strong> Only import these mappings if the breakpoint group below has been imported on that site already, or if they were manually created there.'),
);
// Also export the group it belongs to.
module_load_include('inc', 'breakpoints', 'breakpoints.admin');
$form += drupal_get_form('breakpoints_admin_breakpoint_group_export_form', $mapping->breakpoint_group);
$form['export']['#description'] = t('If you want to import this mapping on an other site,
you\'ll need to import the breakpoint group with its breakpoints as well,
if it doesn\'t already exist on that site.');
return $form;
}