You are here

function _blockreference_entityreference_link_links in Block reference 7.2

Helper to make simple links from blocks for entityreference_link.

1 string reference to '_blockreference_entityreference_link_links'
blockreference_entityreference_link_config in ./blockreference.module
Implements hook_entityreference_link_config().

File

./blockreference.module, line 526

Code

function _blockreference_entityreference_link_links($entity_type, $moddeltas, $options, $context, $element) {
  $links = array();
  foreach ($moddeltas as $moddelta) {
    list($module, $delta) = explode(':', $moddelta);
    $block = _blockreference_block($module, $delta);
    if ($block) {
      $links[] = l($block->info, 'admin/structure/block/manage/' . $module . '/' . $delta . '/configure', $options);
    }
  }
  return $links;
}