You are here

function _blockreference_block_string in Block reference 7.2

Helper to create an autocomplete string from a pretty block.

2 calls to _blockreference_block_string()
blockreference_field_widget_form in ./blockreference.field.inc
Implements hook_field_widget_form().
_blockreference_options in ./blockreference.module
Helper to make pretty options from block objects.

File

./blockreference.module, line 294

Code

function _blockreference_block_string($block) {
  if (!$block) {
    return '';
  }
  $moddelta = $block->module . ':' . $block->delta;
  $label = $block->info;
  return $label . '   [' . $moddelta . ']';
}