You are here

function apachesolr_mlt_block in Apache Solr Search 5

Implementation of hook_block

File

contrib/apachesolr_mlt/apachesolr_mlt.module, line 38

Code

function apachesolr_mlt_block($op = 'list', $delta = 0, $edit = array()) {
  if ($op == 'list') {

    //return all of the moreLikeThis blocks that the user has created
    $blocks = apachesolr_mlt_list_blocks();
    return $blocks;
  }
  else {
    if ($op == 'view' && !empty($delta)) {

      //return the content of the block, based on the delta
      return apachesolr_mlt_suggestions($delta);
    }
  }
}