You are here

function custom_breadcrumbs_features_generic_rebuild_item in Custom Breadcrumbs Features 7.2

Generic function to store a breadcrumb in database.

Parameters

$item: Featurized crumb to rebuild.

$table: Table storing crumbs.

1 call to custom_breadcrumbs_features_generic_rebuild_item()
custom_breadcrumbs_features_generic_rebuild in includes/custom_breadcrumbs_features.features.inc
Generic function for hook_features_rebuild().

File

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

Code

function custom_breadcrumbs_features_generic_rebuild_item($item, $table) {
  $item['bid'] = db_select($table, 'cb')
    ->fields('cb', array(
    'bid',
  ))
    ->condition('machine_name', $item['machine_name'])
    ->execute()
    ->fetchField();
  drupal_write_record($table, $item, empty($item['bid']) ? array() : array(
    'bid',
  ));
}