You are here

function skinr_context_group_export in Skinr 8.2

Same name and namespace in other branches
  1. 7.2 skinr_context/skinr_context.module \skinr_context_group_export()

Output a settings group object as code suitable for skinr_context_group_defaults().

Parameters

$group: A skin settings group object.

$prefix: A string to prefix the code with, used to indent the resulting code.

Return value

A string.

2 calls to skinr_context_group_export()
skinr_context_ui_form_skinr_ui_export_form_alter in skinr_context/skinr_context_ui.module
Implements hook_form_FORM_ID_alter().
skinr_group_features_export_render in skinr_context/skinr_context.features.inc
Implements hook_features_export_render().

File

skinr_context/skinr_context.module, line 432
Provides Skinr integration with Context.

Code

function skinr_context_group_export($group, $prefix = '') {

  // Make sure we don't modify the cached group object.
  $group = clone $group;

  // Let modules modify the skin settings group.
  drupal_alter('skinr_context_group_export', $group, $prefix);
  $output = skinr_object_export($group, 'group', $prefix);
  $output .= $prefix . "\$groups['{$group->gid}'] = \$group;\n";
  return $output;
}