You are here

function custom_breadcrumbs_features_generic_export_render in Custom Breadcrumbs Features 7.2

Generic function for hook_features_export_render().

Parameters

$table: Table storing crumbs.

Return value

Rendered code array as expected by hook_features_export_render().

7 calls to custom_breadcrumbs_features_generic_export_render()
custom_breadcrumbsapi_features_export_render in includes/custom_breadcrumbs_features.features.inc
Implements hook_features_export_render(). [component hook]
custom_breadcrumbs_panels_features_export_render in includes/custom_breadcrumbs_features.features.inc
Implements hook_features_export_render(). [component hook]
custom_breadcrumbs_paths_features_export_render in includes/custom_breadcrumbs_features.features.inc
Implements hook_features_export_render(). [component hook]
custom_breadcrumbs_taxonomy_term_features_export_render in includes/custom_breadcrumbs_features.features.inc
Implements hook_features_export_render(). [component hook]
custom_breadcrumbs_taxonomy_vocabulary_features_export_render in includes/custom_breadcrumbs_features.features.inc
Implements hook_features_export_render(). [component hook]

... See full list

File

includes/custom_breadcrumbs_features.features.inc, line 194
Code to provide custom_breadcrumbs with features integration.

Code

function custom_breadcrumbs_features_generic_export_render($module_name, $data, $export, $table) {
  $code = array();
  $code[] = '  $custom_breadcrumbs = array();';
  $code[] = '';
  foreach ($data as $option) {
    $item = custom_breadcrumbs_features_generic_export_item($option, $table);
    if (isset($item[$option])) {
      $export = features_var_export($item[$option], '  ');
      $identifier = features_var_export($option);
      $code[] = "  // Exported custom breadcrumb: {$option}.";
      $code[] = "  \$custom_breadcrumbs[{$identifier}] = {$export};";
      $code[] = "";
    }
  }
  $code[] = '  return $custom_breadcrumbs;';
  $code = implode("\n", $code);
  return array(
    $table . '_features_default_settings' => $code,
  );
}