You are here

function _fe_block_build_id in Features Extra 6

Same name and namespace in other branches
  1. 7 fe_block/fe_block.module \_fe_block_build_id()

Generate block ID.

2 calls to _fe_block_build_id()
fe_block_settings_features_export_options in ./fe_block.module
Implementation of hook_features_export_options().
fe_block_settings_features_export_render in ./fe_block.module
Implementation of hook_features_export_render().

File

./fe_block.module, line 456

Code

function _fe_block_build_id($block) {
  if (empty($block['module']) || empty($block['delta']) && !is_numeric($block['delta'])) {
    return NULL;
  }
  if ($block['module'] == 'block') {
    $machine_name = _fe_block_get_machine_name($block['delta']);
    if (empty($machine_name)) {
      return NULL;
    }
    return $block['module'] . '-' . $machine_name;
  }
  else {
    return $block['module'] . '-' . $block['delta'];
  }
}